Commit Graph

2 Commits

Author SHA1 Message Date
Alex Vandiver 06543b54b1 backport: Fix the commit-ids that are used.
The commit hashes that appear in the `pull/12345/head` ref are the
ones _before_ any final rebase occurs, and as such may not match to
any commit hashes which exist in `main`.

Use the GitHub GraphQL API to pull the last "merge commit" on the PR,
which is post-rebase, and use that as the target commit when
cherry-picking.  Then walk backwards from that commit, including every
sequential commit which is still associated with the PR; we do this
because during the merge, commits may be added or removed, so the PR
is not reliable in the commit count.
2024-05-06 14:47:22 -07:00
Tim Abbott ef3f990324 tools: Add a tool for backporting PRs. 2024-01-15 17:27:37 -08:00