List of repos 'Maintained' by a user #39712
Replies: 3 comments
-
I believe access to this information is prohibited unless you are a org_member/collaborator/owner of the repo. GitHub Docs - GraphQL API - Enums - RepositoryPermission Example 1:
{
user(login: "domini4") {
repositories(first: 100, ownerAffiliations: [OWNER, COLLABORATOR, ORGANIZATION_MEMBER]) {
totalCount
nodes {
viewerPermission
nameWithOwner
collaborators {
edges {
permission
}
}
}
}
}
} result:
{
"data": {
"user": {
"repositories": {
"totalCount": 32,
"nodes": [
{
"viewerPermission": "READ",
"nameWithOwner": "paigerodeghero/ComputerGameCodingCamp",
"collaborators": null
},
{
"viewerPermission": "READ",
"nameWithOwner": "paigerodeghero/TigerDataCoding",
"collaborators": null
},
...
"errors": [
{
"type": "FORBIDDEN",
"path": [
"user",
"repositories",
"nodes",
0,
"collaborators"
],
"locations": [
{
"line": 8,
"column": 9
}
],
"message": "You do not have permission to view repository collaborators."
},
... |
Beta Was this translation helpful? Give feedback.
-
@LangLangBart Thank you for the reply. Would this information be available if I allows GitHub OAuth authentication/login to my website? |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Is it possible to use GitHub API to list all repos of a user where they are listed as a 'Maintainer'?
https://api.github.com/users/<username/repos gives me a list of repos of the user. Is there a way to identify if the user is a maintainer of any of those repos or any other repos?
Beta Was this translation helpful? Give feedback.
All reactions