-
Notifications
You must be signed in to change notification settings - Fork 29
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
Support rebase/squash merges #46
Comments
An idea is to use List commits on a pull request, but the documentation is unclear about which commits will be listed. It might mean the original commits before the rebase or the commits after the rebase. Additionally, this requires dealing with pagination (max 100, default 30 per page) and has a maximum limit of requesting 250 commits. |
It would be great if it reported back that this is not supported currently. |
As far as I could find, it is currently not possible to know how the pull request was merged (merge commit, rebase or squash). What I could do is add a check to see whether the commits are available to the action and if not comment on the pull request with something like:
Does that help? |
That's great! |
@domenkozar I've merged a PR that performs this check and comments if 1 of the references cannot be found. Please let me know if you run into any problems with it. |
Thank you :) |
@domenkozar Since #162 I believe squash/rebase merges are supported (i.e. from Note that the original commits on the pull request are still cherry-picked. So it does not cherry pick the squash commit (or the rebased commits) that exist on the target after the merge. |
It doesn't seem to work: NixOS/nixpkgs#143639 (comment) |
Currently the action does not support rebase (and squash) merges.
Specifically, this action was build to deal with octopus merges. It does this by looking at the common ancestor of the head and base refs. But after a rebase the branch no longer points to the same head ref, which then ends up not being fetched by the action on checkout.
We should implement an alternative strategy to find all commits merged by the pull request.
UPDATE: With
v1
the action no longer looks for the common ancestor, so it should support rebase/squash merges now. Please reach out if you've tried this out (both success and failure stories are appreciated), as I'd like to know whether we can consider this to be supported nowadays.The text was updated successfully, but these errors were encountered: