Skip to content

Fix publish summary rendering "❓ no result" for every package - #196

Merged
felickz merged 2 commits into
mainfrom
copilot/fix-no-result-in-071
Jul 28, 2026
Merged

Fix publish summary rendering "❓ no result" for every package#196
felickz merged 2 commits into
mainfrom
copilot/fix-no-result-in-071

Conversation

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

The v0.7.1 release notes showed "❓ no result" across the entire publish summary table, even though every package (including the new go/python ext packs) published successfully.

Root cause

Publishing a brand-new pack for the first time triggers a 404 from gh api, which prints its raw, unfiltered error body to stdout even with --jq and 2>/dev/null. That JSON body's embedded quotes leaked through a step output and got interpolated directly via ${{ }} into a jq --arg invocation, breaking its quoting and corrupting the whole call into emitting a bare true/false instead of a JSON object. The summary script then indexed that stray boolean while iterating all fragments, aborting the render for every cell instead of just the broken ones.

Changes

  • check_version steps (all 4 publish jobs): force PUBLISHED_VERSION empty on any gh api failure instead of relying on 2>/dev/null || true, which doesn't stop a leaked stdout error body.
  • Record publish result steps (all 4 publish jobs): pass previous_version/target_version through env: and reference them as shell variables instead of interpolating ${{ }} directly into the jq --arg line, so embedded quotes can no longer corrupt the invocation.
  • build-publish-summary.sh: filter out non-object fragments in cell() so one malformed result only affects its own cell instead of the entire table.
# before: leaks gh api's raw error body into PUBLISHED_VERSION
PUBLISHED_VERSION=$(gh api .../versions --jq '...' 2>/dev/null || true)

# after: forces empty on any failure
if ! PUBLISHED_VERSION=$(gh api .../versions --jq '...' 2>/dev/null); then
  PUBLISHED_VERSION=""
fi

Root cause: gh api leaks its raw error body (with embedded quotes) to
stdout on 404s for brand-new packs, and that raw value was interpolated
directly into a jq --arg via ${{ }}, breaking the quoting and corrupting
the whole jq invocation into writing a bare boolean instead of a JSON
object. That single malformed fragment then aborted jq for every cell.

Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 28, 2026 05:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because there is no eligible user to bill. To allow Copilot reviews on bot-authored pull requests, enable direct organization billing in your organization's Copilot settings.

@felickz
felickz requested a review from Copilot July 28, 2026 05:00
Copilot AI changed the title Fix publish summary showing "❓ no result" for every package in v0.7.1 release notes Fix publish summary rendering "❓ no result" for every package Jul 28, 2026
Copilot AI requested a review from felickz July 28, 2026 05:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 8/8 changed files
  • Comments generated: 6
  • Review effort level: Low

Comment thread python/ext/codeql-pack.lock.yml Outdated
Comment thread java/ext/codeql-pack.lock.yml Outdated
Comment thread java/ext-library-sources/codeql-pack.lock.yml Outdated
Comment thread go/ext/codeql-pack.lock.yml Outdated
Comment thread csharp/ext/codeql-pack.lock.yml Outdated
Comment thread csharp/ext-library-sources/codeql-pack.lock.yml Outdated
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 28, 2026 05:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because there is no eligible user to bill. To allow Copilot reviews on bot-authored pull requests, enable direct organization billing in your organization's Copilot settings.

@felickz
felickz marked this pull request as ready for review July 28, 2026 05:27
@felickz
felickz merged commit a3b74da into main Jul 28, 2026
23 checks passed
@felickz
felickz deleted the copilot/fix-no-result-in-071 branch July 28, 2026 14:17
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.

3 participants