mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:54:58 +00:00
CI: Add a check to report git merge commit
This commit is contained in:
parent
f93c7fbb5e
commit
839c1a574d
2 changed files with 9 additions and 0 deletions
|
@ -34,6 +34,11 @@ while read -r line; do
|
|||
error "Empty line between commit title and body is missing"
|
||||
fi
|
||||
|
||||
merge_commit_pattern="^Merge branch"
|
||||
if [[ $line_number -eq 1 ]] && (echo "$line" | grep -E -q "$merge_commit_pattern"); then
|
||||
error "Commit is a git merge commit, use the rebase command instead"
|
||||
fi
|
||||
|
||||
category_pattern='^(Revert "|\S+: )'
|
||||
if [[ $line_number -eq 1 ]] && (echo "$line" | grep -E -v -q "$category_pattern"); then
|
||||
error "Missing category in commit title (if this is a fix up of a previous commit, it should be squashed)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue