Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions common/scripts/lint-commits
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Copy link
Contributor

@Bnyro Bnyro Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there lots of examples where people pushed fixup! commits?

I usually only see something like
Commit A: New package: abc-123
Commit B: Fix changelog and cross-build
Commit C: Update srcpkgs/template/abc
Commit D: Merge master into ...

So it might also make sense to look for ^[Ff]ix and ^Update?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if someone uses git commit --fixup (I do a lot) it adds thosefixup! commits.

we can add other regexes too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know git has something inbuilt for this.

Good to know, thanks for the explanation :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the other cases you mentioned should be caught by line 51

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?"
Expand Down