Skip to content

fix(ci): allow bot responses on fork PR inline review comments - #1421

Merged
max-sixty merged 1 commit into
mainfrom
fix/fork-inline-comments
Mar 10, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/fork-inline-comments

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Summary

  • Remove the fork filter (head.repo.full_name == github.repository) from the pull_request_review_comment trigger in claude-mention.yaml
  • The filter was added in cd16545 based on the assumption that secrets aren't available for fork PRs — but that restriction only applies to pull_request events, not pull_request_review_comment (which runs on the base repo and has full secret access)
  • The issue_comment path already works on fork PRs, confirming this

Supersedes #1420 (workaround that only posted a redirect notice).

Test plan

  • Verify CI passes (workflow-only change, no code)
  • Test by posting an inline review comment mentioning @worktrunk-bot on a fork PR

Closes #1419

🤖 Generated with Claude Code

The fork filter (`head.repo.full_name == github.repository`) on the
`pull_request_review_comment` trigger was added in cd16545 as a
workaround when the original code used `secrets.*` in a job-level `if:`.
The assumption was that secrets aren't available for fork PRs — but that
restriction only applies to `pull_request` events, not
`pull_request_review_comment` (which runs on the base repo).

The `issue_comment` path already works on fork PRs with full secret
access, confirming this event type does too. Remove the fork filter so
inline review comments on fork PRs get bot responses.

Closes #1419

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@max-sixty
max-sixty merged commit d8078b1 into main Mar 10, 2026
22 checks passed
@max-sixty
max-sixty deleted the fix/fork-inline-comments branch March 10, 2026 16:46
worktrunk-bot added a commit that referenced this pull request Mar 10, 2026
PR #1421 removed the fork filter based on the incorrect assumption that
`pull_request_review_comment` events have access to secrets for fork PRs.
Run 22914840420 proved this wrong — checkout failed with
"Input required and not supplied: token" because WORKTRUNK_BOT_TOKEN was
empty.

`pull_request_review_comment` runs in the fork context (like
`pull_request`), NOT in the base repo context (like `pull_request_target`
or `issue_comment`). Fork PRs should use conversation-tab @worktrunk-bot
mentions instead, which go through `issue_comment` and always have
secret access.

Closes #1424

Co-Authored-By: Claude Opus 4.6 <[email protected]>
worktrunk-bot added a commit that referenced this pull request Mar 10, 2026
PR #1421 removed the fork filter based on the incorrect assumption that
pull_request_review_comment has secret access for fork PRs. It does not —
run 22914840420 failed at checkout with an empty token. Restore the fork
filter and document fork PR secret availability for all event types.

Closes #1424

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.

bot failing to respond

2 participants