13rac1 / block-fixup-merge-action

Github Action to block merge of Pull Requests containing fixup! or squash! commits
MIT License
46 stars 14 forks source link

Using action as required check #5

Closed Maikel-Koek closed 3 years ago

Maikel-Koek commented 4 years ago

Hi @13rac1,

If you're using this action to be a required check of a pull request, how can it ever succeed if it fails after the first push? The history of the failed Github actions remains in the checks-list, so it will always have an unsuccessful check, blocking the merge, if you fix the issues in a push following a failed one.

13rac1 commented 4 years ago

Hi! The historical unsuccessful check does not block the merge, only the most recent Action run matters.

The workflow is documented more thoroughly in the README, but the summary is: Once the code review has been completed, the Pull Request approved, and all other Actions & Checks (Travis/Circle/Jenkins) pass, the final step is cleaning the history:

git rebase -i --autosquash
git push origin HEAD -f

Then you can merge the PR.