Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cherry-pick): respect squash-merges and rebase-merges
Detect if the merge method was either "Squash and Merge" or "Rebase and Merge" by looking at the `merge_commit_sha` field that gets populated when the PR is merged. When the `merge_commit_sha` and the parent of this commit have an association to the pullrequest we can assume that this was "rebased" as the squash method would only produce one commit (the squashed one). When the PR was squashed, we can use the `merge_commit_sha` to create a cherry-pick. When the PR was reased, we can fall back to the existing method and use the commits associated with the PR before merging. Signed-off-by: Joshua Schmid <[email protected]>
- Loading branch information