Skip to content

release: fix the notes step's quoting on release/0.6 (from #901) - #918

Merged
bkeroack merged 3 commits into
release/0.6from
fix/release-notes-quoting-0.6
Oct 6, 2026
Merged

bkeroack merged 3 commits into
release/0.6from
fix/release-notes-quoting-0.6

Conversation

@bkeroack

@bkeroack bkeroack commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Brings the release-workflow quoting fix to release/0.6 so v0.6.1 can be tagged from it. #902 targeted this branch and was closed in favour of #901, which carried the fix to master only, so release/0.6 still has the bug.

The bug

The v0.6.0 release run failed to parse its "Build release notes body" step. release.yml has echo "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:

  • 4a6ebde6 changes the line to ${prev:-the GitHub default}. It also adds scripts/ci/check-workflow-run-syntax.py and a Lint step that runs it, so every workflow run: block gets a syntax check.
  • 09734041 parses sh steps with sh, finds .yaml workflows, and keeps quoted }} in expressions.
  • dadfe2e5 fails the check when it finds nothing to check.

Verified

  • python3 scripts/ci/check-workflow-run-syntax.py on this branch: 174 run blocks parsed, 0 failed.
  • With the old line restored, it fails on that step: job release, Build release notes body: bash: line 42: unexpected EOF while looking for matching '''.
  • It merges cleanly with ci: run Tests and Lint on pushes to release branches #913, which also edits ci.yml (its trigger and header comments; this PR adds a step in lint).

🤖 Generated with Claude Code

bkeroack and others added 3 commits October 6, 2026 13:57
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)
@bkeroack
bkeroack merged commit 532790a into release/0.6 Oct 6, 2026
48 of 49 checks passed
@bkeroack
bkeroack deleted the fix/release-notes-quoting-0.6 branch October 6, 2026 21:21
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