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.
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.