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:
@@ -33,6 +33,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
@@ -50,6 +52,22 @@ jobs:
|
||||
run: cargo clippy --workspace --all-features --locked -- -D warnings
|
||||
- name: Check provider registry drift
|
||||
run: python3 scripts/check-provider-registry.py
|
||||
- name: Check harvested contributor credit
|
||||
if: github.event_name != 'schedule'
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
git fetch --no-tags origin "${{ github.base_ref }}"
|
||||
RANGE="origin/${{ github.base_ref }}..HEAD"
|
||||
elif [[ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]]; then
|
||||
RANGE="${{ github.event.before }}..${{ github.sha }}"
|
||||
else
|
||||
RANGE="HEAD~1..HEAD"
|
||||
fi
|
||||
python3 scripts/check-coauthor-trailers.py \
|
||||
--author-map .github/AUTHOR_MAP \
|
||||
--range "$RANGE" \
|
||||
--check-authors
|
||||
- name: Linux clippy location
|
||||
run: echo "Linux clippy/test gates run on CNB for mirrored fix/*, rebrand/*, work/v*, and main branches."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user