Skip to content

Open the developer page on the interface and float the terminal behind an icon (#539) #990

Open the developer page on the interface and float the terminal behind an icon (#539)

Open the developer page on the interface and float the terminal behind an icon (#539) #990

Workflow file for this run

name: No AI Attribution
on:
push:
branches: [ master, develop ]
pull_request:
types: [ opened, synchronize, reopened, edited ]
branches: [ master, develop ]
permissions:
contents: read
jobs:
check:
name: No AI Attribution
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Select commit range
id: range
run: |
zero=0000000000000000000000000000000000000000
head="${{ github.sha }}"
if [ "${{ github.event_name }}" = "pull_request" ]; then
base="${{ github.event.pull_request.base.sha }}"
head="${{ github.event.pull_request.head.sha }}"
else
before="${{ github.event.before }}"
if [ "$before" != "$zero" ] && git cat-file -e "$before^{commit}" 2>/dev/null; then
base="$before"
else
# Defensive fallback for branch creation or rewritten history on master/develop.
base=""
if git rev-parse -q --verify origin/develop >/dev/null; then
base="$(git merge-base origin/develop "$head" || true)"
fi
if [ -z "$base" ] || [ "$base" = "$head" ]; then
# No usable default branch, or the push is the default branch itself:
# check the whole history rather than a window that could miss a commit.
base=""
fi
fi
fi
echo "base=$base" >> "$GITHUB_OUTPUT"
echo "head=$head" >> "$GITHUB_OUTPUT"
- name: Test attribution checker
run: bash .github/scripts/test-no-ai-attribution.sh
- name: Reject AI-assistance attribution in commits and PR metadata
env:
BASE: ${{ steps.range.outputs.base }}
HEAD: ${{ steps.range.outputs.head }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_BODY: ${{ github.event.pull_request.body }}
run: .github/scripts/check-no-ai-attribution.sh "$BASE" "$HEAD"