Skip to content

Commit 0835512

Browse files
TMHSDigitalclaude
andcommitted
ci: report workflows update only their own bot-authored issue
The link check, re-verify batch and thumbnail report found "their" issue by label and title prefix only, so a user-opened issue with a matching title could capture the report. Each lookup now also requires the issue's author to be app/github-actions. Closes #169 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LpkeXRUqm7oDedPDk3QWtK
1 parent d0af474 commit 0835512

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

‎.github/workflows/links.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ jobs:
4141
PROBLEMS: ${{ steps.check.outputs.problems }}
4242
run: |
4343
title="Link check: ${PROBLEMS} sources need a look"
44-
existing=$(gh issue list --state open --label correction --json number,title \
45-
--jq '[.[] | select(.title | startswith("Link check:"))][0].number // empty')
44+
# Only the bot's own issue: anyone can open one with this label and title.
45+
existing=$(gh issue list --state open --label correction --json number,title,author \
46+
--jq '[.[] | select(.author.login == "app/github-actions" and (.title | startswith("Link check:")))][0].number // empty')
4647
if [ -n "$existing" ]; then
4748
gh issue edit "$existing" --title "$title" --body-file link-report.md
4849
else

‎.github/workflows/reverify.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ jobs:
4040
run: |
4141
month=$(date -u +%Y-%m)
4242
title="Re-verify batch ${month}: ${COUNT} entries due a licence re-read"
43-
existing=$(gh issue list --state open --label "help wanted" --json number,title \
44-
--jq '[.[] | select(.title | startswith("Re-verify batch "))][0].number // empty')
43+
# Only the bot's own issue: anyone can open one with this label and title.
44+
existing=$(gh issue list --state open --label "help wanted" --json number,title,author \
45+
--jq '[.[] | select(.author.login == "app/github-actions" and (.title | startswith("Re-verify batch ")))][0].number // empty')
4546
if [ -n "$existing" ]; then
4647
gh issue edit "$existing" --title "$title" --body-file reverify-batch.md
4748
else

‎.github/workflows/thumbs.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ jobs:
112112
compare="https://github.com/${GITHUB_REPOSITORY}/compare/main...$(printf '%s' "$branch" | sed 's|/|%2F|g')?expand=1"
113113
{ printf 'Open the pull request: %s\n\n' "$compare"; cat "$RUNNER_TEMP/thumbs-report.md"; } > "$RUNNER_TEMP/issue-body.md"
114114
title="Thumbnail refresh ${month}: ${CHANGED} changes"
115-
existing=$(gh issue list --state open --label "enhancement" --json number,title \
116-
--jq '[.[] | select(.title | startswith("Thumbnail refresh "))][0].number // empty')
115+
# Only the bot's own issue: anyone can open one with this label and title.
116+
existing=$(gh issue list --state open --label "enhancement" --json number,title,author \
117+
--jq '[.[] | select(.author.login == "app/github-actions" and (.title | startswith("Thumbnail refresh ")))][0].number // empty')
117118
if [ -n "$existing" ]; then
118119
gh issue edit "$existing" --title "$title" --body-file "$RUNNER_TEMP/issue-body.md"
119120
else

0 commit comments

Comments
 (0)