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 version label behavior for PRs #75

Merged
merged 1 commit into from
Oct 28, 2022
Merged

Conversation

t1m0thyj
Copy link
Contributor

  • Fixes version labels not detected on a PR that has more than 30 events in its history due to GitHub API pagination (example). The workaround in this PR is to set per_page to the max allowed value of 100, and hope that our PRs never exceed that number of events. Considered other options like using the Octokit paginate API to retrieve an unlimited number of events, or issuing GraphQL queries to filter the event list, but neither method supports caching so rate limiting would be a problem.
  • Fixes the version number in package.json being ignored when the GitHub plugin bumps the version. Since the NPM plugin stores the package.json version property in context.version.new, we should prefer it over context.version.old when it is defined. This should bump versions correctly even if past Git tags point to detached commits (example).

Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
@t1m0thyj t1m0thyj requested a review from a team October 28, 2022 14:15
Copy link
Collaborator

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

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

LGTM! 😋

@t1m0thyj t1m0thyj merged commit c9b4b90 into master Oct 28, 2022
@t1m0thyj t1m0thyj deleted the fix-github-versioning branch October 28, 2022 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants