Skip to content

How to fetch a user's permission level using GitHub App and GraphQL? #24513

Discussion options

You must be logged in to vote

This API does exist:

https://api.github.com/repos/OWNER/REPO/collaborators/USERNAME/permission

The response is the following:

{
    "permission": "admin",
    "user": {
        "login": "USERNAME",
        "id": 1,
        "node_id": "NODEID",
        "avatar_url": "https://avatars1.githubusercontent.com/u/",
        "gravatar_id": "",
        "url": "https://api.github.com/users/USERNAME",
        "html_url": "https://github.com/USERNAME",
        "followers_url": "https://api.github.com/users/USERNAME/followers",
        "following_url": "https://api.github.com/users/USERNAME/following{/other_user}",
        "gists_url": "https://api.github.com/users/USERNAME/gists{/gist_id}",
        "…

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants