Repository navigation
fix(ci): release notes dropped backtick identifiers - #20
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #20 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 7 7
Lines 216 216
=========================================
Hits 216 216 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Bug
release.ymlpassed changelog notes intogh release create/gh release editvia inline GitHub Actions interpolation:--notes "${{ steps.changelog.outputs.notes }}".The changelog notes contain markdown inline-code spans like
jackc/pgx/v4. When that text is interpolated into a double-quoted shell argument, each backtick pair is treated as shell command substitution — the shell tries to execute the backticked text as a command and substitutes its (empty, erroring) output. The result: every inline-code identifier is silently deleted from the published release body.Confirmed on the live v1.3.0 release: the body reads "migrated from to " with both identifiers blanked, while
CHANGELOG.mdhas them correct.Fix
Write the extracted notes to a file (
notes.md) instead of aGITHUB_OUTPUTmultiline variable, and pass them togh release create/editwith--notes-file notes.mdinstead of--notes "...". A file path on the command line is never re-parsed by the shell, so backticks (and any other shell metacharacters) in the notes content are inert.As a secondary hardening, the changelog-extraction
awkscript also used to interpolate${{ steps.version.outputs.version }}directly into the awk pattern string; this now goes through anenv:var (VERSION) andawk -v, closing that interpolation surface too, consistent with the same fix.Verification
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/release.yml'))"— parses cleanly.CHANGELOG.mdfor version1.3.0; output correctly retainsjackc/pgx/v4,jackc/pgx/v5, etc.Follow-up for maintainer
This PR only fixes the workflow going forward. The existing v1.3.0 GitHub release still has the corrupted body (identifiers blanked). After merging, the maintainer will need to either delete + re-push the
v1.3.0tag or otherwise re-trigger the release workflow sogh release editregenerates the notes correctly from the fixed pipeline.