Skip to content

Firefly III: a personal finances manager

Update pr-reply-no-disclosure.yml

James Coleb48a40f1e29d
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