[Schema Inaccuracy] `permission` on Add a repository collaborator is valid on personal-account repositories
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- openapi
- Domain
- api, documentation
Research direction
Start in descriptions/[api.github.com/], checking api.github.com.2022-11-28.json and api.github.com.2026-03-10.json for the Add a repository collaborator operation. Update the permission parameter description to distinguish personal-account and organization-owned repositories, then verify both versions consistently document the accepted values and restrictions.
Written by the indexing model from the issue text.
Description
Schema Inaccuracy
Operation: PUT /repos/{owner}/{repo}/collaborators/{username} (Add a repository
collaborator).
The description of the permission body parameter states:
The permission to grant the collaborator. Only valid on organization-owned repositories.
That restriction does not hold. On a repository owned by a personal account the parameter
is honoured for pull, push and admin. Only triage and maintain are
organization-only.
Expected
The permission parameter description should state that on organization-owned
repositories all of pull, triage, push, maintain, admin and custom repository
roles are accepted, while on repositories owned by a personal account only pull, push
and admin are accepted — triage and maintain return 422 Validation Failed.
Reproduction Steps
Against a private repository owned by a personal account:
$ curl -X PUT
-H "Authorization: Bearer $TOKEN"
-H "Accept: application/vnd.github+json"
-H "X-GitHub-Api-Version: 2022-11-28"
https://api.github.com/repos/OWNER/REPO/collaborators/USERNAME
-d '{"permission":"pull"}'
→ HTTP 201, and the returned invitation object contains "permissions": "read".
Full sweep of all five values, cancelling the invitation between attempts:
| requested | HTTP | recorded permissions |
|---|---|---|
pull |
201 | read |
triage |
422 | Validation Failed |
push |
201 | write |
maintain |
422 | Validation Failed |
admin |
201 | admin |
Identical sweep against a private organization-owned repository, same script and
token: all five accepted and recorded as requested.
Enforcement matches what is recorded: a collaborator granted pull on a private
personal-account repository has git push rejected by the server.
Note on versioning: this description is identical in both published API versions in
descriptions/[api.github.com/](http://api.github.com/) on main — api.github.com.2022-11-28.json and
api.github.com.2026-03-10.json both contain the "Only valid on organization-owned
repositories." sentence verbatim. So this is not a leftover in an older version.
Related documentation issue: github/docs#45537
- Dominant language
- No language data
- Stars
- 1.6k
- Forks
- 342
- Avg merge
- 3h 33m
- Merged PRs (30d)
- 51
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/rest-api-description
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
github/rest-api-description#7201 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/rest-api-description#7163 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7162 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7135 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
github/rest-api-description#7111 · 1 comment ·
All issues in github/rest-api-description
Similar issues
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100