ci: enforce ascii-only pr body and widen the self-check grep#98
Merged
Conversation
The section 3.7 preview grep only matched CJK plus full-width punctuation, so em-dash / curly quotes / ellipsis passed as clean while the CI (commit_lint._is_ascii) rejects any non-ascii. Since the squash commit body is the PR description, such a char fails the post-merge commit lint on main (as seen on #97). Switch to grep -nP "[^\x00-\x7F]", and note in the 3.1.1 punctuation row that the rule is ascii-only, not merely no-full-width. Co-authored-by: Claude (claude-opus-4-8) <noreply@anthropic.com>
The PR body becomes the squash commit body, but nothing checked it before merge: the pr-title job only linted the title, and commit-lint only saw branch commits. A non-ascii PR body therefore only failed the post-merge commit lint on main, too late to fix cleanly (as on #97). Add check_pr_body (ascii-only, reusing commit_lint._is_ascii) and a Validate PR body step in the pull_request job, so a non-ascii body fails the PR check before merge and points at the offending line. Co-authored-by: Claude (claude-opus-4-8) <noreply@anthropic.com>
arelchan
approved these changes
Jul 7, 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.
Summary
A non-ASCII PR body slipped onto main via #97: the repo squash-merges with
the PR description as the commit body, but nothing checked that body before
merge, so an em-dash only tripped the post-merge commit lint on main (too
late to fix cleanly). Close the gap at both the guidance and the enforcement
layer.
check_pr_body(ASCII-only, reusingcommit_lint._is_ascii) and a "Validate PR body" step in the pull_requestjob, so a non-ASCII PR body fails the PR check before merge and points at
the offending line.
[^\x00-\x7F](anynon-ASCII), not a CJK-only pattern that gave a false pass.
merely no-full-width (calls out em-dash / curly quotes / ellipsis).
Type
Verification
Risk
The new check runs in the existing required pull_request job, so it is
enforced immediately without a new required-check name. ASCII-only PR bodies
are already implied by the squash-to-main constraint, so this only moves the
check earlier (pre-merge instead of post-merge).
Related Issues
N/A (follow-up to the commit-lint failure on #97)