Repository navigation
release: fix the notes step's quoting on release/0.6 (from #901) - #918
Merged
Merged
Conversation
The v0.6.0 release run built every artifact, then its GitHub Release job
failed before creating the release: bash 5.2 read the apostrophe in
"${prev:-GitHub's default}" as an opening quote and the step did not
parse ("unexpected EOF while looking for matching `''"). The step only
runs on a tag, and actionlint runs with shellcheck off, so no PR run
parsed it. The message now reads "the GitHub default".
CI's Lint job gains scripts/ci/check-workflow-run-syntax.py, which runs
`bash -n` over every bash run block under .github/workflows (174 today),
with ${{ ... }} expressions replaced by a plain word. Without the fix it
fails on exactly this step; with it, all 174 parse.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 1efc86e)
(cherry picked from commit 4a6ebde)
…xpressions
Three gaps in check-workflow-run-syntax.py from review:
- A `shell: sh` step was parsed with `bash -n`, so a bashism there passed
the check and would fail under dash on the runner. Each block is now
parsed by its own shell.
- Only *.yml was globbed; GitHub also runs *.yaml.
- The ${{ ... }} substitution stopped at the first `}}`, even inside a
quoted literal: `echo ${{ format('{0}}}', github.ref) }}` left a stray
quote and failed. The pattern now skips single-quoted literals.
The script also takes workflow paths as arguments, which is how each case
was checked against a fixture: a bashism under `shell: sh` fails, a
.yaml-only workflows directory is found, the unquoted format() call
passes (the previous version failed it), and the v0.6.0 quoting bug still
fails. The repository's 174 run blocks all parse.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 3c00afd)
(cherry picked from commit 0973404)
Run from the wrong directory, or after the workflows directory moved, the check printed "0 run blocks parsed, 0 failed" and passed. It now fails when no run block was found. From an empty directory the previous version exits 0 and this one exits 1; the repository's 174 run blocks still pass. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit bd3c70d) (cherry picked from commit dadfe2e)
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.
Brings the release-workflow quoting fix to
release/0.6so v0.6.1 can be tagged from it. #902 targeted this branch and was closed in favour of #901, which carried the fix tomasteronly, sorelease/0.6still has the bug.The bug
The v0.6.0 release run failed to parse its "Build release notes body" step.
release.ymlhasecho "PR list compares against: ${prev:-GitHub's default}", and bash 5.2 reads the apostrophe inside${prev:-…}as an opening quote. A v0.6.1 tag pushed from this branch would fail the same way.What's in it
The three commits #901 put on
master, cherry-picked with-x, with the same patch:4a6ebde6changes the line to${prev:-the GitHub default}. It also addsscripts/ci/check-workflow-run-syntax.pyand aLintstep that runs it, so every workflowrun:block gets a syntax check.09734041parsesshsteps withsh, finds.yamlworkflows, and keeps quoted}}in expressions.dadfe2e5fails the check when it finds nothing to check.Verified
python3 scripts/ci/check-workflow-run-syntax.pyon this branch: 174 run blocks parsed, 0 failed.job release, Build release notes body: bash: line 42: unexpected EOF while looking for matching '''.ci.yml(its trigger and header comments; this PR adds a step inlint).🤖 Generated with Claude Code