Skip to content

fix: gh api's 404 body landed in the URL for a repo with no Pages site - #27

Merged
sotashimozono merged 1 commit into
mainfrom
fix/gh-api-error-body-lands-in-the-url
Sep 9, 2026
Merged

sotashimozono merged 1 commit into
mainfrom
fix/gh-api-error-body-lands-in-the-url

Conversation

@sotashimozono

Copy link
Copy Markdown
Member

Caught by the first pull request that exercised the new default — QAtlasHub/templateHPC.jl#9, a repository with no Pages site. The comment it posted read:

https://docs.github.com/rest/pages/pages#get-a-apiname-pages-site","status":"404"}/previews/PR9/

gh api writes its error JSON to stdout, --jq passes it through unfiltered, and || true hides the non-zero exit — so the fallback written for exactly this case never ran.

Checked for shape now, not for exit code. Dry-run on both:

resolved
no Pages site (templateHPC.jl) https://qatlashub.github.io/templateHPC.jl/previews/PR9/
Pages site (SweepRunner.jl) https://qatlashub.github.io/SweepRunner.jl/previews/PR40/200

🤖 Generated with Claude Code

Caught by the first pull request that exercised the new default. templateHPC.jl has no Pages site,
and the comment it posted read

    https://docs.github.com/rest/pages/pages#get-a-apiname-pages-site","status":"404"}/previews/PR9/

`gh api` writes its error JSON to STDOUT, `--jq` passes it through unfiltered, and `|| true`
hides the non-zero exit — so the fallback that exists for exactly this case never ran.

Checked for SHAPE now rather than for exit code. Dry-run on both:

    no Pages site   https://qatlashub.github.io/templateHPC.jl/previews/PR9/
    Pages site      https://qatlashub.github.io/SweepRunner.jl/previews/PR40/   (200)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sotashimozono
sotashimozono merged commit bd38dc5 into main Sep 9, 2026
1 check passed
@sotashimozono
sotashimozono deleted the fix/gh-api-error-body-lands-in-the-url branch September 9, 2026 10:04
sotashimozono added a commit to QAtlasHub/templateHPC.jl that referenced this pull request Sep 9, 2026
A re-run reuses the reusable workflow at the ref the original run resolved, so it cannot pick up
QAtlasHub/.github#27. A new event can.
sotashimozono added a commit to QAtlasHub/templateHPC.jl that referenced this pull request Sep 9, 2026
…tes (#9)

* chore: drop the preview-base override the reusable workflow now computes

The default was `https://codes.sota-shimozono.com`, which resolves to
`sinkhole.paloaltonetworks.com`, so this repository passed the right base by hand. QAtlasHub/.github#26
made the default ask the Pages API where the site actually is, which for this repository answers
`https://qatlashub.github.io/templateHPC.jl/` — the same value this line was supplying.

The preview comment on this pull request is the check: it should read
`https://qatlashub.github.io/templateHPC.jl/previews/PR<N>/` with the override gone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* ci: re-run the preview with the fixed reusable workflow

A re-run reuses the reusable workflow at the ref the original run resolved, so it cannot pick up
QAtlasHub/.github#27. A new event can.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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