Skip to content

fix: paginate installed repos in trusted-publisher plugin#127

Merged
jkleinsc merged 1 commit into
mainfrom
fix/paginate-trusted-publisher-installed-repos
May 26, 2026
Merged

fix: paginate installed repos in trusted-publisher plugin#127
jkleinsc merged 1 commit into
mainfrom
fix/paginate-trusted-publisher-installed-repos

Conversation

@VerteDinde

@VerteDinde VerteDinde commented May 26, 2026

Copy link
Copy Markdown
Member

Summary

The trusted-publisher plugin caches the list of repositories installed under the npm publisher GitHub App per-org. The fetch at src/permissions/plugins/trusted-publisher/index.ts:73 was using a non-paginated octokit.request, so only the first ~30 results were cached. Any repo beyond that page (e.g. extract-zip, recently added in electron/.permissions#347) was repeatedly treated as not-installed, causing the cron to re-issue the idempotent add PATCH and log Installing npm publisher github app into <repo> on every run, plus add a noisy line to the Slack summary.

Switching to octokit.paginate matches the pattern already used immediately above for the installations lookup, and lets octokit unwrap the { total_count, repositories } envelope into a flat array — so we can also drop the .data indirection.

Note: We should run a dry run after this is merged to make sure it's catching the new apps.

🤖 Generated with Claude Code

The lookup of repositories installed under the npm publisher GitHub
App was using a non-paginated `octokit.request`, so only the first
page of results was cached. Any repo beyond that page was treated as
not-installed every cron run, repeatedly re-issuing the idempotent
`add` PATCH and logging "Installing npm publisher github app into
<repo>" on each pass.

Switch to `octokit.paginate` (matching the sibling installations
lookup just above) so the full set of installed repos is captured.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@VerteDinde VerteDinde requested a review from a team as a code owner May 26, 2026 21:03
@jkleinsc jkleinsc merged commit 1d83a4c into main May 26, 2026
6 checks passed
@jkleinsc jkleinsc deleted the fix/paginate-trusted-publisher-installed-repos branch May 26, 2026 21:05
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.

2 participants