Skip to content

Fix tend-mention failing on fork PRs - #206

Merged
max-sixty merged 1 commit into
mainfrom
fix-fork-pr-filter
Apr 9, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix-fork-pr-filter

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

In 0.0.9, the bot-self filter was removed from the verify job's if condition for pull_request_review and pull_request_review_comment events. The intent was to move filtering into the verify step's shell script — but that script needs GH_TOKEN from secrets.BOT_TOKEN, which is unavailable on fork PRs.

This matters because tend-review (using pull_request_target, which always has secrets) posts a review on fork PRs, which fires pull_request_review: submitted, triggering tend-mention — where secrets are absent and gh exits with code 4.

Two changes:

  • Restore bot-self filter in the if condition for pull_request_review and pull_request_review_comment, with a comment explaining why it's required (not just an optimization)
  • Switch verify step's GH_TOKEN from secrets.BOT_TOKEN to github.token as defense-in-depth — verify only does read-only API calls, and github.token is always available even on fork PRs

This was written by Claude Code on behalf of @max-sixty

Restore bot-self filter in the verify job's `if` condition for
pull_request_review and pull_request_review_comment events. This filter
is required (not just an optimization) because fork PRs don't have
access to secrets, so the verify step's gh API calls fail.

Also switch the verify step's GH_TOKEN from secrets.BOT_TOKEN to
github.token — verify only does read-only calls, and github.token is
always available, even on fork PRs.

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit e9d3357 into main Apr 9, 2026
5 checks passed
@max-sixty
max-sixty deleted the fix-fork-pr-filter branch April 9, 2026 04:02
max-sixty added a commit that referenced this pull request Apr 9, 2026
Bumps generator version to 0.0.10 and syncs lockfile.

10 commits since 0.0.9: fix tend-mention on fork PRs (#206), add notifications:read to PAT scopes (#205), improve install-tend skill (#207), document org membership for bot accounts (#204), expand regtest snapshots (#199, #195), simplify nightly survey (#200), add release skill (#198), move tend upgrade to nightly skill (#197).

Co-Authored-By: Claude <[email protected]>
@max-sixty max-sixty mentioned this pull request Apr 9, 2026
max-sixty added a commit that referenced this pull request Apr 9, 2026
## Summary

- Bump generator version to 0.0.10 and sync lockfile

10 commits since 0.0.9: fix tend-mention on fork PRs (#206), add
notifications:read to PAT scopes (#205), improve install-tend skill
(#207), document org membership for bot accounts (#204), expand regtest
snapshots (#199, #195), simplify nightly survey (#200), add release
skill (#198), move tend upgrade to nightly skill (#197).

> _This was written by Claude Code on behalf of Maximilian Roos_

Co-authored-by: Claude <[email protected]>
max-sixty added a commit that referenced this pull request Apr 9, 2026
The org membership section was based on an incorrect diagnosis — the
actual fix was in PR #206. Outside collaborators with write access work
fine; the bot just needs to be a repo collaborator.

Co-Authored-By: Claude <[email protected]>
max-sixty added a commit that referenced this pull request Apr 9, 2026
Removes the broken `@README.md` reference (resolved to the user's repo
README, not tend config docs) and the org membership requirement section
(was based on an incorrect diagnosis — the actual fix was #206).

> _This was written by Claude Code on behalf of Maximilian Roos_

---------

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants