ci: raise the commit body line limit to 100 characters - #6743
Merged
Conversation
The 80-character body limit sat in a dead zone: git log indents bodies by four spaces, so an 80-column body already wraps in a standard terminal, and the limit was too narrow to hold a long URL or an advisory summary. The GHSA-c5cf-fr53-8wq4 commit failed on seven lines wrapped at 82. The subject stays at 80 — GitHub truncates commit and pull request titles well before that, so widening it would only hide text.
|
Claude finished @otavio's task in 54s —— View job Code Review CompleteReviewed 1 file across code quality, security, testing, language patterns, and architecture — no new issues found. The code looks good as-is. The change is a clean, single-purpose adjustment: the To request another review round, comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Raises the
Check Line Lengthlimit inCommit Message Checkfrom 80 to 100characters. The subject limit is unchanged at 80.
Why
The GHSA-c5cf-fr53-8wq4 commit failed the check on master
(run 30293820299),
with seven body lines wrapped at 81-82 characters.
The 80-character body limit sat in a dead zone.
git logindents bodies by fourspaces, so an 80-column body already renders at 84 and wraps in a standard
terminal — the limit was neither the conventional 72 (chosen so 72+4 fits) nor
wide enough to be permissive. It was also too narrow to hold a long URL or an
advisory summary, and the body pattern has no exemption for unwrappable content,
unlike the title pattern which exempts
Merge pull request.The subject stays at 80 because GitHub truncates commit and pull request titles
well before that, so widening it would hide text rather than help.
Changes
.github/workflows/commit.yml:Check Line Lengthpattern{0,80}->{0,100}, with the error message updated to match.The companion change to the
commitskill, which documents the same limit, is inshellhub-io/claude. Without it the skill that writes commit messages and thecheck that validates them would disagree.
Testing
Verified the old and new patterns against the actual GHSA commit body and
synthetic inputs, using
re.fullmatchto match JavaScript$semantics (thepattern uses only
[^\n]classes, no dot, so the engines agree):The boundary is exact and the previously failing commit now passes.
Not addressed
Raising the limit does not touch three structural gaps found while investigating,
each of which would have let this failure happen at any limit:
pushtomaster, where a failure is unactionable — thecommit is already merged and can only be fixed by rewriting history.
disabled, so its PR reported no checks and the commit was first linted only
after landing on public master.
discover violations in CI, and the error names no specific line.
Replacing the six regex steps with commitlint would address all three with one
config shared by CI and a
commit-msghook. Out of scope here.