How to retrieve the list of all GitHub repositories of a person?

后端 未结 15 1097
一个人的身影
一个人的身影 2020-12-02 05:43

We are working on a project where we need to display all the projects of a person in his repository on GitHub account.

Can anyone suggest, how can I display the na

15条回答
  •  有刺的猬
    2020-12-02 06:27

    There's now an option to use the awesome GraphQL API Explorer.

    I wanted a list of all my org's active repos with their respective languages. This query does just that:

    {
      organization(login: "ORG_NAME") {
        repositories(isFork: false, first: 100, orderBy: {field: UPDATED_AT, direction: DESC}) {
          pageInfo {
            endCursor
          }
          nodes {
            name
            updatedAt
            languages(first: 5, orderBy: {field: SIZE, direction: DESC}) {
              nodes {
                name
              }
            }
            primaryLanguage {
              name
            }
          }
        }
      }
    }
    
    

提交回复
热议问题