dist/tools: add no-merge and colon check to commit-msg check#21803
dist/tools: add no-merge and colon check to commit-msg check#21803crasbe merged 5 commits intoRIOT-OS:masterfrom
Conversation
AnnsAnns
left a comment
There was a problem hiding this comment.
Looks good, I don't feel confident enough about my shell script knowledge to be the one to approve this though.
|
Looking at the code to review it, I was wondering where the "fixup!"/"squash!" etc checks went, turns out, it is in a completely different file RIOT/dist/tools/pr_check/check.sh Lines 35 to 41 in c99a260 Maybe it makes sense to put those the keyword checks there? |
065fbf4 to
41ae1bd
Compare
|
Sorry for the force-pushing, I couldn't make the changes just with fixup without screwing everything up 😅 |
83821e5 to
76ac3e4
Compare
@miri64 is that how you would like to have it? :) |
978ceb7 to
aa9de2f
Compare
|
@miri64 I think all of the review points are addressed now 🤔 |
miri64
left a comment
There was a problem hiding this comment.
Just some (potentially follow-up) suggestion for user-experience improvement. Other than that: LGTM. Please squash (and remove the test commits, to clear the tests ;-))
| ANNOTATION="${ANNOTATION}\n\nPLEASE ONLY SQUASH WHEN ASKED BY A " | ||
| ANNOTATION="" | ||
| while read -r commit; do | ||
| ANNOTATION="${ANNOTATION}Commit needs to be squashed or contains a no-merge keyword: \"${commit}\"\n" |
There was a problem hiding this comment.
Looking at the output of that: Should we maybe add some information what exactly the "no-merge keywords" are.
There was a problem hiding this comment.
Since we already point to https://github.com/RIOT-OS/RIOT/blob/master/CONTRIBUTING.md#squash-commits-after-review, I added some remarks there.
e7be352 to
bdf88c1
Compare
|
Thank you for the reviews :) |
dist/tools: fix no-merge-keywords of pr_check (fix regression from #21803)


Contribution description
As discussed in #21772, the Commit Message check currently does not test for no-merge commit messages such as "WIP", "TEMP", "DONOTMERGE", "DELETEME", ... (anyone got more ideas btw?)
Also it did not test for a missing colon nor a missing space after the colon. which it does now.
Testing procedure
The script should fail in this PR already and I prepared some test commits. Please note that I had to get creative with the
donot/mergecommits to not trigger my own script 🤣Also here is what you'd see on the console and a screenshot of it.
Issues/PRs references
Fixes #21772.