Detect and block merge commits in CI#13494
Conversation
|
Yes, we should block fixup commits too. If one of those goes in it’s probably a mistake — the author forgot to squash. |
92d832e to
1a9b580
Compare
.github/workflows/ci.yml
Outdated
| - name: Test Docker Image | ||
| run: core/docker/build.sh | ||
| - name: Block Merge Commits | ||
| uses: nineinchnick/block-commits-action@cea2eb9b1b83c500d877cd60649d98b58fc2423c |
There was a problem hiding this comment.
Can we put this somewhere under our github org?
Do we need a new repo, for actions?
There was a problem hiding this comment.
In #12817 I have a few actions that I added to nineinchnick/github-actions and I suggested to transfer this repo to the trinodb org. If you'd create it, I could add this action there too.
This will make contributors think that fixup commits shouldn't be used, while we actually encourage people to use them, during the review. let's focus on merge commits for now. |
73b0a1d to
0504aac
Compare
I added both behaviors, to fail on merge commits and to request changes on fixup commits. The Github Action adds reviews and it looks like this: Tested in nineinchnick#12 |
.github/workflows/ci.yml
Outdated
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Check Commits | ||
| uses: nineinchnick/block-commits-action@cf4e63bde529c78a14e987b6648046e0b815305a |
There was a problem hiding this comment.
There was a problem hiding this comment.
0504aac to
e77be63
Compare
|
See CI failure. Related. |
Merge commits will cause the pipeline to fail, because they're never allowed. Fixup commits on the other hand are helpful during longer reviews and shouldn't cause the run to fail. Instead, the action creates a review and requests changes.
a75c359 to
16043fe
Compare
|
The two failures don't look related, I think it's ready to go now. |
hashhar
left a comment
There was a problem hiding this comment.
Looks good. We can iterate from here.
Thanks @nineinchnick.


Description
Detect and block merge commits and commits with
fixup!in the message.Related issues, pull requests, and links
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
(x) No release notes entries required.
( ) Release notes entries required with the following suggested text: