worktrunk icon indicating copy to clipboard operation
worktrunk copied to clipboard

bot failing to respond

Open max-sixty opened this issue 8 months ago • 3 comments

@worktrunk-bot what is going on here?!

https://github.com/max-sixty/worktrunk/pull/1401#discussion_r2909499492

max-sixty avatar Mar 10 '26 08:03 max-sixty

Thanks for reporting this! I investigated and found the root cause.

All three of your attempts to reach the bot on #1401 were inline review comments (pull_request_review_comment events). PR #1401 is a fork PR (from jradtilbrook), and the claude-mention workflow explicitly skips inline review comments on fork PRs because secrets aren't available in that context. The runs were silently skipped with no feedback to the user — that's the bug.

The workaround is to use a Conversation tab comment (which fires as an issue_comment event and does have secrets). But obviously a silent skip with no guidance is a poor experience.

I've opened #1420 with a fix that adds a lightweight fork-pr-redirect job — when someone mentions @worktrunk-bot in an inline review comment on a fork PR, it replies with a notice explaining the limitation and directing them to the Conversation tab. This uses GITHUB_TOKEN which is available even on fork PRs.

A maintainer will review shortly.

worktrunk-bot avatar Mar 10 '26 08:03 worktrunk-bot

can we fix the underlying restriction so we can get responses on fork PR comments?

max-sixty avatar Mar 10 '26 08:03 max-sixty

Yes! Investigated further and the fork filter was unnecessary.

The restriction on secrets for fork PRs only applies to pull_request events. The pull_request_review_comment event runs on the base repo and has full access to secrets — same as issue_comment, which already works on fork PRs. The fork filter was added in cd16545b as a workaround when the original if: used secrets.* (which breaks GitHub validation), and incorrectly assumed the event didn't get secrets.

Opened #1421 to remove the filter. Closed #1420 (the redirect workaround) since this is a better fix.

worktrunk-bot avatar Mar 10 '26 08:03 worktrunk-bot