ci: enforce mappable co-author credit
Add AUTHOR_MAP plus a lightweight co-author trailer checker so harvested commits use numeric GitHub noreply identities, reject bot/tool trailers, and require machine-readable credit when a commit says it was harvested from a PR.
Also normalize the local unpushed v0.9 harvest range so existing contributor authors/trailers for HUQIANTAO, Implementist, jrcjrcc, xyuai, cyq1017, idling11, and shenjackyuanjie use GitHub-mappable identities before the branch is published.
Validation: python3 scripts/check-coauthor-trailers.py --author-map .github/AUTHOR_MAP --range origin/main..HEAD --check-authors; python3 -m py_compile scripts/check-coauthor-trailers.py; ruby -e 'require "yaml"; YAML.load_file(".github/workflows/ci.yml")'; git diff --check; negative in-process validation for raw email, missing harvested credit, and bot author cases.
This commit is contained in:
+5
-1
@@ -98,8 +98,12 @@ When this happens:
|
||||
- If the maintainer copies or adapts your code, the harvested commit also
|
||||
keeps attribution with the original author identity when possible: either by
|
||||
preserving the commit author on a cherry-pick or by adding a
|
||||
`Co-authored-by: Name <email>` trailer from the original PR commit. This is
|
||||
`Co-authored-by: Name <id+login@users.noreply.github.com>` trailer. This is
|
||||
what lets GitHub's contribution surfaces recognize more than prose credit.
|
||||
Maintainers should use `.github/AUTHOR_MAP`, or run
|
||||
`gh api users/<login> --jq '"\(.id)+\(.login)@users.noreply.github.com"'`,
|
||||
rather than copying raw, `.local`, or old-style noreply emails from a
|
||||
contributor's machine.
|
||||
- The `CHANGELOG.md` entry for the next release credits you by handle.
|
||||
- The auto-close workflow closes your PR with a templated thank-you and
|
||||
a link to the commit on `main`.
|
||||
|
||||
Reference in New Issue
Block a user