Expose inactive threshold on paced ordered consumer #1
Workflow file for this run
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
| name: AI Policy Check | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| merge_group: | |
| types: [checks_requested] | |
| permissions: | |
| contents: read | |
| jobs: | |
| no-ai-attribution: | |
| name: AI Policy Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check commit attribution | |
| uses: commit-check/commit-check-action@bbb6580f01838e475563514f115ec7ef41c9ddc7 # v2.11.1 | |
| env: | |
| CCHK_AI_ATTRIBUTION: "forbid" | |
| CCHK_CONVENTIONAL_COMMITS: "false" | |
| CCHK_SUBJECT_CAPITALIZED: "false" | |
| CCHK_SUBJECT_IMPERATIVE: "false" | |
| CCHK_ALLOW_EMPTY_COMMITS: "true" | |
| CCHK_ALLOW_WIP_COMMITS: "true" | |
| CCHK_REQUIRE_BODY: "false" | |
| CCHK_REQUIRE_SIGNED_OFF_BY: "false" | |
| with: | |
| message: true | |
| branch: false | |
| author-name: false | |
| author-email: false | |
| pr-title: false | |
| job-summary: true | |
| pr-comments: false | |
| # commit-check v2.11.1 misses space-separated model names such as | |
| # "Claude Opus 5 (1M context)"; anchor on AI noreply emails and | |
| # tool-name-plus-version trailers until fixed upstream. | |
| - name: Check AI attribution in trailers (supplemental) | |
| shell: bash | |
| run: | | |
| if [ "$GITHUB_EVENT_NAME" = "merge_group" ]; then | |
| BASE="${{ github.event.merge_group.base_sha }}" | |
| HEAD="${{ github.event.merge_group.head_sha }}" | |
| else | |
| BASE="${{ github.event.pull_request.base.sha }}" | |
| HEAD="${{ github.event.pull_request.head.sha }}" | |
| fi | |
| PATTERN='^(co-authored-by|assisted-by):(.*<[^>]*noreply@anthropic\.com[^>]*>.*|[^<]*\b(claude|gpt|gemini|copilot|codex|cursor|aider|devin|windsurf|tabby)\b[^<]*[0-9].*)$' | |
| FAILED=0 | |
| for sha in $(git rev-list "$BASE..$HEAD"); do | |
| if git log -1 --format=%B "$sha" | grep -qiE "$PATTERN"; then | |
| echo "::error::Commit $sha contains forbidden AI attribution:" | |
| git log -1 --format=%B "$sha" | grep -iE "$PATTERN" | |
| FAILED=1 | |
| fi | |
| done | |
| if [ "$FAILED" -ne 0 ]; then | |
| echo "AI tools must not be listed as commit authors or co-authors." \ | |
| "Remove the trailer (rebase/amend) and force-push." \ | |
| "See https://github.com/evolution-gaming/.github/blob/main/AI_POLICY.md" | |
| exit 1 | |
| fi | |
| - name: Link AI policy on failure | |
| if: failure() | |
| shell: bash | |
| run: | | |
| POLICY="https://github.com/evolution-gaming/.github/blob/main/AI_POLICY.md" | |
| echo "::error::AI tools must not be listed as commit authors or co-authors. Remove the trailer (rebase/amend, then force-push). AI Contribution Policy: $POLICY" | |
| { | |
| echo "" | |
| echo "## ❌ AI Contribution Policy" | |
| echo "" | |
| echo "AI tools may assist with development, but they must not be listed as commit" | |
| echo "authors or co-authors — a human author takes responsibility for every commit." | |
| echo "" | |
| echo "**Fix:** remove the AI trailer from the flagged commits (\`git rebase -i\` /" | |
| echo "\`git commit --amend\`) and force-push the branch." | |
| echo "" | |
| echo "📄 [Read the full AI Contribution Policy]($POLICY)" | |
| } >> "$GITHUB_STEP_SUMMARY" |