Skip to content

fix: reply-to-mention doesn't work for review comments on forks#196

Merged
derekmisler merged 1 commit into
docker:mainfrom
derekmisler:fix-reply-to-mention-doesnt-work-for-review-comm
May 8, 2026
Merged

fix: reply-to-mention doesn't work for review comments on forks#196
derekmisler merged 1 commit into
docker:mainfrom
derekmisler:fix-reply-to-mention-doesnt-work-for-review-comm

Conversation

@derekmisler
Copy link
Copy Markdown
Contributor

@derekmisler derekmisler commented May 8, 2026

Summary

Fixes @docker-agent mentions 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-context job: in_reply_to_id, has_mention, is_review_cmd, and author_type are now available as workflow outputs for downstream jobs to make routing decisions.

  • Add cross-run artifact support in reply-to-mention job: 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_comment event 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 by reply-to-mention), with proper support for both direct events and cross-run artifact scenarios.

  • Update documentation: Clarified that @docker-agent mentions now work in both PR-level comments and inline review comments, including on fork PRs.

Closes: https://github.com/docker/gordon/issues/559

Signed-off-by: Derek Misler <derek.misler@docker.com>
@derekmisler derekmisler self-assigned this May 8, 2026
@derekmisler derekmisler requested a review from a team May 8, 2026 14:06
@derekmisler derekmisler marked this pull request as ready for review May 8, 2026 14:06
@derekmisler
Copy link
Copy Markdown
Contributor Author

/review

@derekmisler derekmisler merged commit be2371a into docker:main May 8, 2026
11 checks passed
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