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
The NPM module repos grabs the JSON for all public repos for some user or group. You can run this directly from npx
so you don't need to install anything just pick an org or user ("W3C" here):
$ npx repos W3C W3Crepos.json
This will create a file called W3Crepos.json. Grep is good enough to e.g. fetch the list of repos:
$ grep full_name W3Crepos.json
pros:
cons:
npx
(or npm
if you want to install it for real).If looking for repos of an organisation-
api.github.com/orgs/$NAMEOFORG/repos
Example:
curl https://api.github.com/orgs/arduino-libraries/repos
Also you can add the per_page parameter to get all names just in case there is a pagination problem-
curl https://api.github.com/orgs/arduino-libraries/repos?per_page=100
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
}
}
}
}
}