Files
jsonPrism/.github/workflows
poli0981andClaude Opus 4.7 4bf239e089 fix(workflow): announce-discussion unbound var + literal $VAR text (#21)
Two bugs in `.github/workflows/announce-discussion.yml` surfaced when
v1.3.1 published:

1. `DEPLOY_URL: unbound variable` when triggered by `release` event.
   `${{ github.event.workflow_run.* }}` evaluates to null on a release
   event, and the resulting env-var assignment leaves the variable
   unset (not empty), which `set -u` then trips on. Guard every
   dynamic value with `|| ''` so each env var is always at least an
   empty string.

2. Body strings used `$'...'` ANSI-C quoting (which expands backslash
   escapes but NOT variables), so the discussion body would have
   contained literal `$RELEASE_TAG` text. Rewrite to plain double-quoted
   strings, using `$'\n'` only for embedded newlines.

Also pass dynamic values (REPO_ID / CAT_ID / TITLE / BODY) into the
Create Discussion step through env vars instead of literal `${{ ... }}`
substitution — protects against titles/bodies containing quotes or
other shell-special characters that would otherwise break the command
line.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 18:32:59 +07:00
..
2026-05-12 19:58:14 +07:00