Fix reply-to-feedback auth in reusable workflow#97
Open
derekmisler wants to merge 1 commit intodocker:mainfrom
Open
Fix reply-to-feedback auth in reusable workflow#97derekmisler wants to merge 1 commit intodocker:mainfrom
derekmisler wants to merge 1 commit intodocker:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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=falsefor 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
76a15ea to
c5cbc34
Compare
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
Fix reply-to-feedback auth in the reusable workflow (
review-pr.yml).The auth step was reading
author_associationfrom$GITHUB_EVENT_PATHviajq, which is empty/minimal inworkflow_callcontext. This caused all reply attempts to be silently rejected as unauthorized — even for org members.Switches to
github.event.comment.author_associationvia 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