Skip to content

fix(ci): PublishRelease could not read its own PRs — grant pull-requests: read - #31

Merged
sotashimozono merged 1 commit into
mainfrom
fix/publish-release-pr-scope
Aug 9, 2026
Merged

sotashimozono merged 1 commit into
mainfrom
fix/publish-release-pr-scope

Conversation

@sotashimozono

Copy link
Copy Markdown
Member

Fixes the Resource not accessible by integration (search.nodes.0) failure that kills Publish Release at Build release notes on every tag.

build_release_notes.py reads merged PRs through gh pr list --search, which resolves over the GraphQL search connection and needs pull-requests: read. This repo wrote the block in flow style (permissions: { contents: write }) — same statement, same consequence: a permissions: mapping is a replacement, not an addition, so every unlisted scope is none. Rewritten as a block mapping so the reason sits next to the scope.

Why it survived unnoticed: the release is created anyway. What it carries is the Release Drafter's accumulated body, never overwritten because gh release edit --notes-file is the step after the one that dies. Measured on FunctionMeasures.jl: every release shipped all 126–130 PRs ever merged.

Last of the fleet sweep — 15 repos fixed today, 3 already had it.

…ests: read`

`Publish Release` dies at `Build release notes` on every tag:

    gh pr list --repo … --search 'merged:>…' --json number,title,author,body,…
    GraphQL: Resource not accessible by integration (search.nodes.0)

`build_release_notes.py` resolves that over the GraphQL search connection, which needs
`pull-requests: read`. This repo wrote the block in FLOW style — `permissions: { contents: write }`
— which is the same statement and has the same consequence: a `permissions:` mapping is a
REPLACEMENT, not an addition, so every unlisted scope is `none` and the job had no read access to
pull requests at all. Rewritten as a block mapping so the reason can be stated next to the scope.

The failure is invisible from the releases page: the release is created anyway, and what it carries
is the Release Drafter's accumulated body, never overwritten because `gh release edit --notes-file`
is the step AFTER the one that dies. Measured on FunctionMeasures.jl, where this was found: every
release shipped all 126–130 PRs ever merged, growing by one entry per release.

Last of the fleet sweep; ComplexAnalysis.jl, ParaLinearAlgebra.jl and ParameterizedITensor.jl
already had it, the other 14 were fixed alongside this one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sotashimozono
sotashimozono merged commit de83936 into main Aug 9, 2026
@github-actions github-actions Bot added the bug Something isn't working label Aug 9, 2026
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

📚 Docs preview: https://codes.sota-shimozono.com/ParamIO.jl/previews/PR31/

(updates on each push to this PR)

@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant