Replies: 3 comments 1 reply
|
Your API reading is correct. The current Packages REST API does not expose the entries under Manage Actions access, and there is no equivalent GraphQL mutation. The supported automation options today are therefore architectural workarounds:
So the requested API is a real gap: if adding each generated repository to the packageβs Actions access list is a hard requirement, there is currently no supported way to automate that same UI operation. Current GitHub documentation:
|
|
You're right - there's currently no REST or GraphQL endpoint to mutate a packages per-repository access list. That part is UI-only (Package settings -> Manage Actions access), and it's been a long-standing gap (tracked in several other discussions here too). A workaround that actually fixes the scale problem instead of working around the UI: stop relying on the repo-linked access list at all. Make the package organization-owned rather than tied to one source repo. Since team membership is managed via the org API (PUT /orgs/{org}/teams/{team_slug}/memberships/{username}), you can fully automate onboarding new repos without ever touching the package access-list UI or waiting on a human. |
|
There is currently no REST API to manage repo-to-package access. The packages REST API only supports package/version operations like list, get, delete, and restore. github docs confirm that adding a repo to an existing package can only be done from Package settings > Manage Actions access > Add repo. There is no api for this today. So IMO, best option is to raise this as a feature request through GitHubβs feedback channel. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
π·οΈ Discussion Type
Product Feedback
Body
Hello,
My team writes reusable CI/CD workflows for an org of around 900 engineers, and our test-harness on Github Actions is set up to build and push container-images from a dynamically generated repo to an existing repository's package-registry.
We do not currently see a way to add the new repository to the access-list of the existing package, so that image-pushes don't fail with a permission_denied. We have checked the API listings here: https://docs.github.com/en/rest/packages/packages?apiVersion=2026-03-10, and while we see endpoints for list / get / delete etc. we haven't been provided a way to change package-access permissions.
We are aware repos can be added to the access list through the UI, however UI does not work at our scale - it introduces a human dependency in a test-automation. Another feedback about the UI dialog itself is that it takes many seconds to load and display the repositories we have [and we have over 9k repositories], and the search-bar it provides does not work well.
Please provide an API to grant access to a repository to push images to a registry in a different repository.
All reactions