Repository navigation
chore: regenerate workflows with tend 0.0.10 - #210
Conversation
The mention workflow was last generated with 0.0.9. Regenerating picks up two fixes from the generator: bot-author filters on PR review events (required for fork PRs without secret access) and using github.token in the verify step. Co-Authored-By: Claude Opus 4.6 <[email protected]>
| verify: | ||
| # Filter out bot's own reviews/comments at the job level. This is required | ||
| # (not just an optimization) because pull_request_review events on fork PRs | ||
| # do not have access to secrets, so the verify step's API calls would fail. |
There was a problem hiding this comment.
but then why aren't we filtering out those events on fork PRs?? rather than this filter?
There was a problem hiding this comment.
You're right that we could also filter on fork PRs (e.g. github.event.pull_request.head.repo.full_name != github.repository). But the bot-self filter solves two problems at once:
- Fork PRs: The bot posting a review via tend-review (which uses
pull_request_targetand has secrets) firespull_request_review: submitted, triggering tend-mention where secrets aren't available. Filtering out the bot's own reviews catches exactly this. - Same-repo PRs: Prevents the bot from processing its own reviews even when secrets are available — avoids wasted compute and self-conversation loops.
A fork-only filter would handle (1) but not (2), so we'd need both checks. The bot-self filter alone covers both cases.
The comment is misleading though — it frames the filter as primarily about fork PRs when it's also independently useful. Happy to reword the comment if you'd prefer.
There was a problem hiding this comment.
we want it to process it's own reviews where possible; so just switch to filtering on fork PRs; and confirm that the notifications workflow will pick it up
There was a problem hiding this comment.
Done — switched to filtering on github.event.pull_request.head.repo.full_name == github.repository so the bot processes its own reviews on same-repo PRs. Fork PRs get filtered out, and the notifications workflow picks those up (it explicitly handles fork PR inline comments).
| echo "should_run=false" >> "$GITHUB_OUTPUT" | ||
| env: | ||
| GH_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
| GH_TOKEN: ${{ github.token }} |
There was a problem hiding this comment.
I don't understand why this is better?!
There was a problem hiding this comment.
Two reasons:
- Always available:
github.tokenworks on fork PRs;secrets.BOT_TOKENdoesn't. This is defense-in-depth — if theif:filter fails to catch a fork event, the verify step still runs instead of crashing. - Least privilege: The verify step only does read-only API calls (checking if the bot previously participated). It doesn't need
BOT_TOKEN's elevated permissions.secrets.BOT_TOKENis still used where it's needed — the reaction step and the handle job.
There was a problem hiding this comment.
Reverted — verify step uses secrets.BOT_TOKEN again.
Replace `user.login != bot` checks on review events with `head.repo.full_name == github.repository` so the bot can process its own reviews on same-repo PRs. Fork PRs (where secrets are unavailable) are filtered out instead — the notifications workflow polls for those. Also reverts GH_TOKEN in the verify step back to secrets.BOT_TOKEN. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Bumps generator version to 0.0.11 and syncs lockfile. 4 commits since 0.0.10: docs(review-reviewers) non-issue guidance (#213), workflow regeneration (#210), example config nightly/weekly fix (#211), install-tend skill cleanup (#209). Co-Authored-By: Claude <[email protected]>
Bumps generator version to 0.0.11 and syncs lockfile. 4 commits since 0.0.10: - docs(review-reviewers): mark bot re-approval as a non-issue (#213) - chore: regenerate workflows with tend 0.0.10 (#210) - fix: update example config nightly/weekly descriptions (#211) - Clean up install-tend skill (#209) > _This was written by Claude Code on behalf of Maximilian_ Co-authored-by: Claude <[email protected]>
Summary
tend-mention.yamlto match the current generator (0.0.10)pull_request_reviewandpull_request_review_commentevents — required because fork PRs don't have access to secrets, so the verify step's API calls would fail without this filterGH_TOKENfromsecrets.BOT_TOKENtogithub.tokenfor the same fork PR reasonThese fixes were in the generator since #206 but the committed workflows were last regenerated with 0.0.9 (#196).
Test plan
git diffbetween committed file anduvx tend@latest init --dry-runoutput shows no differences🤖 Generated with Claude Code