Skip to content

Fix reply-to-feedback auth in reusable workflow#97

Open
derekmisler wants to merge 1 commit intodocker:mainfrom
derekmisler:fix-reply-to-feedback-auth-in-reusable-workflow
Open

Fix reply-to-feedback auth in reusable workflow#97
derekmisler wants to merge 1 commit intodocker:mainfrom
derekmisler:fix-reply-to-feedback-auth-in-reusable-workflow

Conversation

@derekmisler
Copy link
Contributor

@derekmisler derekmisler commented Mar 13, 2026

Summary

Fix reply-to-feedback auth in the reusable workflow (review-pr.yml).

The auth step was reading author_association from $GITHUB_EVENT_PATH via jq, which is empty/minimal in workflow_call context. This caused all reply attempts to be silently rejected as unauthorized — even for org members.

Switches to github.event.comment.author_association via env var, which GitHub resolves correctly in reusable workflows.

Impact: Fixes broken reply-to-feedback for all repos using the reusable workflow (e.g., docker/ai).

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

@derekmisler derekmisler marked this pull request as ready for review March 13, 2026 17:14
@derekmisler derekmisler requested a review from a team as a code owner March 13, 2026 17:14
Copy link
Contributor

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Assessment: 🟢 APPROVE

Summary

This PR fixes authentication in the reply-to-feedback job by switching from reading author_association via jq from $GITHUB_EVENT_PATH to using the GitHub Actions context expression github.event.comment.author_association.

The change is well-structured and defensive:

  • ✅ Properly handles empty/null values with an explicit check (line 427)
  • ✅ Falls back safely to authorized=false for unexpected values
  • ✅ Updates the warning message to reflect the new data source
  • ✅ Maintains the same authorization logic (OWNER|MEMBER|COLLABORATOR)

The code correctly addresses the issue described in the PR: $GITHUB_EVENT_PATH being empty/minimal in workflow_call context. Using the GitHub Actions context expression is the recommended approach for reusable workflows.

Findings

No bugs found in the changed code. The implementation is safe and follows GitHub Actions best practices.

$GITHUB_EVENT_PATH is empty/minimal in workflow_call context, causing
jq to return empty and all reply attempts to be rejected. Use
github.event.comment.author_association via env var instead, which
GitHub resolves correctly even in reusable workflows.

Closes: docker/gordon#214
@derekmisler derekmisler force-pushed the fix-reply-to-feedback-auth-in-reusable-workflow branch from 76a15ea to c5cbc34 Compare March 13, 2026 17:25
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.

1 participant