From 1b8bb452c3720da6f3d9f5faca526e763e53fcde Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 3 Jul 2026 05:48:05 +0200 Subject: [PATCH 1/2] Enhance PR reply workflow to include github-actions check Added check for 'github-actions' author to prevent processing. Signed-off-by: James Cole --- .github/workflows/pr-reply-no-disclosure.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-reply-no-disclosure.yml b/.github/workflows/pr-reply-no-disclosure.yml index 825022e0c2..bd23487864 100644 --- a/.github/workflows/pr-reply-no-disclosure.yml +++ b/.github/workflows/pr-reply-no-disclosure.yml @@ -19,13 +19,18 @@ jobs: - run: | BODY=$(gh pr view $NUMBER --json body) AUTHOR=$(gh pr view $NUMBER --json author) - + if [[ $AUTHOR == *"app/dependabot"* ]]; then echo "Is dependabot, stop" exit 0 fi - echo "Not dependabot!" + if [[ $AUTHOR == *"github-actions"* ]]; then + echo "Is github-actions, stop" + exit 0 + fi + + echo "Not dependabot: $AUTHOR" # $BODY must contain one of these four uses. if [[ $BODY != *"Code generation"* && From b48a40f1e29de20e73b5d692b4239c7e666e1c7c Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 3 Jul 2026 05:51:49 +0200 Subject: [PATCH 2/2] Update pr-reply-no-disclosure.yml Signed-off-by: James Cole --- .github/workflows/pr-reply-no-disclosure.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-reply-no-disclosure.yml b/.github/workflows/pr-reply-no-disclosure.yml index bd23487864..41afb1850f 100644 --- a/.github/workflows/pr-reply-no-disclosure.yml +++ b/.github/workflows/pr-reply-no-disclosure.yml @@ -7,7 +7,7 @@ on: # permissions needed for reacting to IssueOps commands on issues and PRs permissions: - contents: read + contents: write pull-requests: write issues: write checks: read @@ -19,7 +19,7 @@ jobs: - run: | BODY=$(gh pr view $NUMBER --json body) AUTHOR=$(gh pr view $NUMBER --json author) - + if [[ $AUTHOR == *"app/dependabot"* ]]; then echo "Is dependabot, stop" exit 0 @@ -38,6 +38,7 @@ jobs: $BODY != *"Documentation"* && $BODY != *"Research and understanding"* && $BODY != *"I used AI assistance for"* ]]; then + echo 'PR contains no AI disclosure.' MESSAGE="Hi there! This is an automated reply. \`Share and enjoy\` @@ -54,7 +55,8 @@ jobs: There cannot be interaction with your PR without this disclosure. If the disclosure is present but the bot did not pick up on it, please accept my apologies for the intrusion. Contrary to other bots, this one is just a simple \`bash\` script and it may be wrong." - + + echo 'Will now leave comment.' gh pr comment "$NUMBER" --body "$MESSAGE" echo "Triggered on AI disclosure missing." exit 0