diff --git a/.github/workflows/ai-slop-gate.yml b/.github/workflows/ai-slop-gate.yml index 234379357..937567b7d 100644 --- a/.github/workflows/ai-slop-gate.yml +++ b/.github/workflows/ai-slop-gate.yml @@ -30,11 +30,19 @@ jobs: PR_BODY: ${{ github.event.pull_request.body }} LABELS: ${{ join(github.event.pull_request.labels.*.name, ',') }} DRAFT: ${{ github.event.pull_request.draft }} + ASSOCIATION: ${{ github.event.pull_request.author_association }} + AUTHOR_TYPE: ${{ github.event.pull_request.user.type }} run: | if [ "$DRAFT" = "true" ] || printf '%s' "$LABELS" | grep -q 'no-issue-needed'; then echo "Draft or no-issue-needed; linkage check skipped." exit 0 fi + # OWNER/MEMBER/COLLABORATOR and bots mirror the slop review's + # skip-roles/skip-bots trust tier. + if [ "$AUTHOR_TYPE" = "Bot" ] || [ "$ASSOCIATION" = "OWNER" ] || [ "$ASSOCIATION" = "MEMBER" ] || [ "$ASSOCIATION" = "COLLABORATOR" ]; then + echo "Bot or trusted author ($ASSOCIATION); linkage check skipped." + exit 0 + fi if printf '%s\n%s\n' "$PR_TITLE" "$PR_BODY" | grep -Eq '#[0-9]+|issues/[0-9]+'; then echo "Issue reference found." else