spacedentist / spr

Submit pull requests for individual, amendable, rebaseable commits to GitHub
https://getcord.github.io/spr/
MIT License
391 stars 41 forks source link

Update handling of base branch #55

Closed flooey closed 2 years ago

flooey commented 2 years ago

Previously, the base branch name (when needed) was based on the pull request number, which meant that it had to push the pull request with the default base branch first, then get the pull request number, then update it to change the base branch. We found that didn't play nicely with CODEOWNERS, which might trigger differently on the diff between the revision and the default base branch than between the revision and the pushed base branch.

Instead update things so the base branch name doesn't use the pull request number, but uses the slug of the title instead, and set it on the initial pull request creation.

Test Plan: Created a commit on top of this one and used the new version to create a PR. It produced https://github.com/getcord/spr/pull/54, which has the new format for the base branch name and doesn't have the base branch changing post-creation.