fix: replace SHA in comment example with @VERSION placeholder#118
Merged
derekmisler merged 1 commit intodocker:mainfrom Mar 26, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
This PR fixes a false-positive in the release workflow verification by replacing a real SHA in a documentation comment with a @VERSION placeholder.
Analysis:
- The change is in a YAML comment (line 15) that serves as a usage example
- The actual workflow code continues to use properly pinned SHA references
- No functional code is modified
- The
@VERSIONplaceholder prevents the verification grep from matching this comment line
Verdict: No bugs detected. This is a safe documentation-only change that resolves the release workflow issue.
The SHA+version-comment on line 15 was a documentation example inside a YAML comment block. The release workflow's OLD_PIN_PATTERN grep matched it as a stale ref, causing the 'Create release commit with pinned refs' step to fail at the verification stage. Replacing the real SHA with '@Version' means it no longer matches '@[a-f0-9]{40}', so neither the update-self-refs sed nor the verification grep will ever touch it again. This also replaces all SHA-pinned refs in markdown documentation files (README.md, review-pr/README.md, security/README.md) with '@Version' so the update-self-refs job's markdown sed pass never matches them again. Accordingly, the MD_PIN_PATTERN definition and its while loop have been removed from release.yml's update-self-refs job — they will never match anything and are dead code. Assisted-By: docker-agent
6a2630d to
fce1429
Compare
trungutt
approved these changes
Mar 26, 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.
Problem
The release workflow (
release.yml) was failing at the "Create release commit with pinned refs" step.Line 15 of
.github/workflows/review-pr.ymlis a YAML comment that serves as a documentation example:# uses: docker/cagent-action/.github/workflows/review-pr.yml@dba0ca51938c78afb363625363c50582243218d6 # v1.3.1Although the
sedreplacement is comment-aware (anchored onuses:) and correctly skips this line, the verificationgrep(OLD_PIN_PATTERN) is not — it matched the SHA in the comment and reported it as a stale ref, causing the step to exit with an error.Fix
Replace the real SHA in the comment with a plain
@VERSIONplaceholder. This is a documentation example; it does not need a real SHA.# uses: docker/cagent-action/.github/workflows/review-pr.yml@VERSIONWhy this works:
@VERSIONcontains no 40-character hex string, so it never matches@[a-f0-9]{40}update-self-refssed nor the verification grep will ever touch it againTesting
After this merge, a release workflow run will find exactly the three real
uses:lines (lines 231, 353, 696) and successfully pin + verify them without hitting the false-positive on line 15.