bytedance / bytedance/CompoundVM
[CI] Commit checker accepts canonical Co-authored-by trailers
- Dominant language
- Java
- Stars
- 118
- Forks
- 22
- Avg merge
- 8d 8h
- Merged PRs (30d)
- 4
Description
## Affected revision
`52b3ab0606d14300ba30a6a46c155c5892a06381` on `jdk17u-target8`.
## Problem
The commit-message checker intends to reject autogenerated co-author trailers, but `check_forbidden_lines` performs a case-sensitive prefix comparison against only:
```text
Co-Authored-By:
```
The canonical Git trailer spelling `Co-authored-by:` therefore passes.
## Minimal reproduction
```powershell
$env:PYTHONIOENCODING='utf-8'
"[Hotspot] Fix`n`nCo-authored-by: Aime " |
python .github/scripts/check_commit.py --stdin
```
Current result:
```text
Commit: [Hotspot] Fix
✅ OK
--- Result: 1/1 passed ---
```
The existing unit test covers only the exact `Co-Authored-By:` casing.
## Impact
A commit can contain the trailer that the repository policy explicitly intends to forbid while still passing the required pull-request commit check.
Git trailer tokens are conventionally treated without case significance, so casing should not bypass this policy. The same normalization should be applied consistently to every entry in `FORBIDDEN_LINES`.
## Expected behavior
`Co-Authored-By:`, `Co-authored-by:`, and other casing variants should all be rejected, with regression coverage for the canonical spelling.
I checked the complete issue/PR inventory and relevant script history; no equivalent report or pending fix was found.
Contributor guide
Research direction
Start with .github/scripts/check_commit.py, focusing on check_forbidden_lines and FORBIDDEN_LINES, then inspect the existing unit test for the exact Co-Authored-By: casing. Reproduce the canonical Co-authored-by: example with the --stdin entry point and add regression coverage; done means all casing variants are rejected while the existing checks still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100