fix: reply-to-mention doesn't work for review comments on forks#196
Merged
derekmisler merged 1 commit intoMay 8, 2026
Conversation
Signed-off-by: Derek Misler <derek.misler@docker.com>
Contributor
Author
|
/review |
dgageot
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes
@docker-agentmentions not working for review comments on fork PRs. The issue was that the mention-reply handler couldn't access the original comment context when triggered from a fork, since fork workflows have limited permissions. This PR adds a cross-run artifact mechanism to pass comment context from the trigger workflow to the reply handler.Changes
Extract and expose comment metadata in
resolve-contextjob:in_reply_to_id,has_mention,is_review_cmd, andauthor_typeare now available as workflow outputs for downstream jobs to make routing decisions.Add cross-run artifact support in
reply-to-mentionjob: Downloads the PR review context artifact (saved by the trigger workflow) when invoked from a fork, allowing access to the original comment even with limited permissions.Synthesize mention-reply event context: Reconstructs a synthetic
pull_request_review_commentevent from the artifact, enabling the mention-reply handler to process fork comments as if they were native events.Improve routing logic: Updated conditions to distinguish between replies to agent comments (handled by
reply-to-feedback) and top-level mentions (handled byreply-to-mention), with proper support for both direct events and cross-run artifact scenarios.Update documentation: Clarified that
@docker-agentmentions now work in both PR-level comments and inline review comments, including on fork PRs.Closes: https://github.com/docker/gordon/issues/559