File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 ref : ${{ github.event.pull_request.head.sha }}
1313 fetch-depth : 0
1414
15+ - name : check PR description for AI co-author pattern
16+ shell : bash
17+ run : |
18+ BLOCKED_PATTERN='Co-authored-by:.*ai|Co-authored-by:.*agent|Co-authored-by:.*copilot|Co-authored-by:.*llm|Co-authored-by:.*gpt'
19+ PR_BODY="${{ github.event.pull_request.body }}"
20+ if echo "${PR_BODY}" | grep -Eiq "${BLOCKED_PATTERN}"; then
21+ echo "FAIL: PR description contains blocked co-author AI pattern." >&2
22+ echo "Blocked pattern: ${BLOCKED_PATTERN}" >&2
23+ echo "Please remove AI-generated co-author lines from PR description." >&2
24+ exit 1
25+ fi
26+ echo "PASS: PR description does not contain blocked AI co-author pattern."
27+
28+ - name : check commit messages for AI co-author pattern
29+ shell : bash
30+ run : |
31+ BLOCKED_PATTERN='Co-authored-by:.*ai|Co-authored-by:.*agent|Co-authored-by:.*copilot|Co-authored-by:.*llm|Co-authored-by:.*gpt'
32+ COMMIT_MSGS=$(git log --format=%B ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} 2>/dev/null || true)
33+ if [[ -n "${COMMIT_MSGS}" ]] && echo "${COMMIT_MSGS}" | grep -Eiq "${BLOCKED_PATTERN}"; then
34+ echo "FAIL: Commit messages contain blocked co-author AI pattern." >&2
35+ echo "Blocked pattern: ${BLOCKED_PATTERN}" >&2
36+ exit 1
37+ fi
38+ echo "PASS: Commit messages do not contain blocked AI co-author pattern."
39+
1540 - name : Call Conventional Commits Checker
1641 uses : linuxdeepin/action-conventionalcommits-checker@master
You can’t perform that action at this time.
0 commit comments