On GitHub, a user can have pinned repositories.
There\'s also the Repositories section of the API describing how to make requests that involve repos. You can also ge
You can get pinned repository using Github GraphQL API :
{
repositoryOwner(login: "bertrandmartel") {
... on User {
pinnedRepositories(first:6) {
edges {
node {
name
}
}
}
}
}
}
Try it in the explorer
You can request it with curl with :
curl -H "Authorization: bearer TOKEN" --data-binary @- https://api.github.com/graphql <
You can parse the JSON output with jq JSON parser :
username=bertrandmartel
curl -s -H "Authorization: bearer TOKEN" \
-d '{ "query": "query { repositoryOwner(login: \"'"$username"'\") { ... on User { pinnedRepositories(first:6) { edges { node { name } } } } } }" }' \
https://api.github.com/graphql | \
jq -r '.data.repositoryOwner.pinnedRepositories.edges[].node.name'