Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix counting of released RCs #19

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open

Fix counting of released RCs #19

wants to merge 1 commit into from

Conversation

tomalec
Copy link
Member

@tomalec tomalec commented Jul 23, 2023

Changes proposed in this Pull Request:

  • Fix counting of released RCs
  • Add more elaborate description to --includeRC.

Related:

Screenshots:

image

image

Detailed test instructions:

  1. checkout and npm run build

  2. use l-x command with --includeRC --includePatches, with an offset big enough, to get some RCs. Like

    dewped latest-versions woocommerce 5 -p -r
    
  3. Check that the number of results is equal to offset+1

Additional details:

Add more elaborate description to `--includeRC`.

Related:
 - woocommerce/grow#65
- woocommerce/grow#66
@tomalec tomalec self-assigned this Jul 23, 2023
@tomalec tomalec requested a review from a team July 23, 2023 14:22
Copy link
Member

@eason9487 eason9487 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix.

I guess it should be fine to proceed with merging as it works, but the code snippet looks a bit confusing. Wonder if it could apply the same change as woocommerce/grow#66?

const releasesAdded = output.filter(
  release => (includeRC || !isRC(release)),
)

@@ -90,7 +92,7 @@ Fetching L-4 versions woocommerce!

for (const version of versions) {
const releasesAdded = output.filter(
release => !isRC(release),
release => (includeRC || !isRC(release)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why the applied fix is not the same as it is in woocommerce/grow#66?

Comment on lines +69 to +70
// Actually there is no quarantee, that the current L-x version will include any patches.
// But with a high offset, we increase the likelyhood of that.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"quarantee" and "likelyhood" look like typos.

Comment on lines +102 to +104
// Actually there is no quarantee, that the current L-x version will include any RC.
// For example, if there wre x+1 patches, there will be no RC.
// But with a high offset, we increase the likelyhood of that.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same typos as above? And the "wre" seems to be a typo as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants