Repository navigation
ci(commit_checks): measure squash subjects without the PR number - #33
Merged
Merged
Conversation
Root cause: a squash merge on GitHub forms the commit subject from the pull request title and appends " (#<number>)". The title check measures the title alone, so a title of 67 to 72 characters passes and lands as a subject of 73 to 78. Any pull request whose range holds such a commit then fails the Commit subjects check on a subject its author cannot change: 6080624 (Dronecode#24) is 76 characters, and a fork's sync branch that brings main's history fails on it. release_commit_checks.py runs the same script over a release's range, so the first tag after the first release would fail on it too. Mechanism: in range mode the script reads each commit's committer email with its subject. For a commit GitHub itself committed (noreply@github.com), which is how squash merges are committed, the length check leaves out a trailing " (#<number>)". Commits people make and the pull request title are measured in full, and the form and scope checks see the whole subject. commit_checks.yml runs the new tests. Validation: the five tests in commit_checks/tests pass (a squash commit of 70 characters plus its number; the same subject committed by a person fails; a squash subject over 72 without its number fails; a number that is not at the end counts; the title counts every character), and without the change one of them fails. The script passes over 2b3ecf4..5d7d65e, which holds 6080624. actionlint 1.7.12 with shellcheck 0.11.0, zizmor 1.31.1 and 1.30.1, the 46 workflow_lint tests and check_ci_policy report nothing. Assisted-by: Claude-Code:claude-opus-5-5 Signed-off-by: Nuno Marques <nmarques@riis.com>
TSC21
force-pushed
the
ci/squash-subjects
branch
from
October 28, 2026 02:55
b8aaafa to
341e4f7
Compare
mrpollo
approved these changes
Oct 28, 2026
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.
A squash merge on GitHub turns the pull request title into the commit subject and appends " (#)". The title check measures the title alone, so a title of 67 to 72 characters lands on main as a subject of 73 to 78, and every later pull request whose range holds that commit fails Commit subjects on a subject nobody can change. #24's 6080624 is 76 characters: a fork's sync branch that brings main's history fails on it today, and release_commit_checks.py would fail the first tag after the first release on it.
With this change the length check leaves the trailing " (#)" out for commits GitHub itself committed, which is how squash merges are committed, and only there: commits people make and the pull request title still count every character, and the form and scope checks see the whole subject. New tests in commit_checks/tests cover both sides, and commit_checks.yml runs them.
Wire impact: none.
Assisted-by: Claude-Code:claude-opus-5-5