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

Handle merge case where no prior release PR exists, but commit history exists #324

Conversation

JAForbes
Copy link
Owner

@JAForbes JAForbes commented May 11, 2022

Fixes #323

I've reworked the code to be a bit less temporal. Instead of relying on upper and lower data bounds by querying for prior/latter PRs to identify which feature branches belong to a release, I'm using a fairly obscure octokit method:

listPullRequestsAssociatedWithCommit

This allows me to get the PRs associated with every commit associated with a given PR. I can then test the extractChangelog without having to actually merge a release PR.

I'd like to make pr use this as well, but that would involve creating the PR at the start of the function instead of at the end. Previously I was trying to make mutative API calls at the end of the job so if there was an early crash the repo wouldn't be left with unfinished state. But I think its worth reworking that.

@JAForbes JAForbes added bug Something isn't working enhancement New feature or request labels May 11, 2022
@JAForbes JAForbes linked an issue May 11, 2022 that may be closed by this pull request
@JAForbes JAForbes changed the title Fixes #323 Handle merge case where no prior release PR exists, but commit history exists May 11, 2022
@JAForbes JAForbes force-pushed the 323-merge-command-doesnt-handle-no-existing-pr-with-long-commit-history branch from 89ef4f7 to 55bb0a4 Compare May 11, 2022 08:28
@JAForbes JAForbes merged commit d59cef7 into next May 11, 2022
@JAForbes JAForbes mentioned this pull request May 11, 2022
JAForbes added a commit that referenced this pull request May 11, 2022
* Fixes #323 (#324)

* Fix non updating release title (#328)

* Handle unpublished package in prerelease fn (#329)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge command doesn't handle no existing PR with long commit history.
1 participant