common/scripts/lint-commits: fail on merge and fixup commits

This commit is contained in:
classabbyamp
2026-02-03 08:33:25 -05:00
committed by classabbyamp
parent 158459ce04
commit 7588e217af
+2
View File
@@ -49,6 +49,8 @@ do
!subject {
if (length > 50) { print "::warning title=Commit Lint::" C ": subject is a bit long" }
if (!($0 ~ ":" || $0 ~ "^Take over maintainership " || $0 ~ "^Orphan ")) { print "::error title=Commit Lint::" C ": subject does not follow CONTRIBUTING.md guildelines"; exit 1 }
if ($0 ~ "^fixup! ") { print "::error title=Commit Lint::" C ": fixup commit included, please squash commits"; exit 1 }
if ($0 ~ "^Merge ") { print "::error title=Commit Lint::" C ": merge commit included, please rebase and remove merge commits"; exit 1 }
# Below check is too noisy?
# if (!($0 ~ "^New package:" || $0 ~ ".*: update to")) {
# print "::warning title=Commit Lint::" C ": not new package/update/removal?"