Open andygout opened 4 years ago
Using GitHub Developer Guide: GraphQL API Explorer, we can make the same queries as those demonstrated in the README:
GET /tako/repositories
Get a list of all the repositories.
{ "repositories": [ { "name": "foo-bar", "owner": "acme", "topics": ["example"] } ] }
This can be replaced with:
{ search(type: REPOSITORY, query: "org:Financial-Times topic:customer-products", first: 50) { repositoryCount repos: edges { repo: node { ... on Repository { name repositoryTopics(first: 10) { nodes { topic { name } } } } } } } }
which returns:
{ "data": { "search": { "repositoryCount": 279, "repos": [ { "repo": { "name": "n-express-monitor", "repositoryTopics": { "nodes": [ { "topic": { "name": "customer-products" } }, { "topic": { "name": "component" } } ] } } }, { "repo": { "name": "n-makefile", "repositoryTopics": { "nodes": [ { "topic": { "name": "customer-products" } } ] } } }, …
GET /tako/repositories/?topic=serverless
Get a list of repositories, filtered by a [topic](Get a list of repositories, filtered by a topic.).
{ search(type: REPOSITORY, query: "org:Financial-Times topic:customer-products topic:serverless", first: 50) { repositoryCount repos: edges { repo: node { ... on Repository { name repositoryTopics(first: 10) { nodes { topic { name } } } } } } } }
{ "data": { "search": { "repositoryCount": 26, "repos": [ { "repo": { "name": "next-myft-email-reporting", "repositoryTopics": { "nodes": [ { "topic": { "name": "customer-products" } }, { "topic": { "name": "myft" } }, { "topic": { "name": "serverless" } } ] } } }, { "repo": { "name": "app-push-notifications", "repositoryTopics": { "nodes": [ { "topic": { "name": "customer-products" } }, { "topic": { "name": "serverless" } }, { "topic": { "name": "team-apps" } }, { "topic": { "name": "lambda" } } ] } } }, …
However…
{ search(type: REPOSITORY, query: "org:Financial-Times", first: 50) { repositoryCount repos: edges { repo: node { ... on Repository { name repositoryTopics(first: 10) { nodes { topic { name } } } } } } } }
repositoryCount: 2326
and then using a different format of query…
{ organization(login: "Financial-Times") { repositories(first: 100) { totalCount nodes { name repositoryTopics(first: 10) { nodes { topic { name } } } } } }
repositoryCount: 2394
Where did 68 missing repos go?
GitHub UI states 2.4k repositories (so the exact figure upon which that was presumably rounded up is unclear):
tako
"owner"
Having spoken to @sjparkinson, we can now also rely on Biz Ops for this information.
Using GitHub Developer Guide: GraphQL API Explorer, we can make the same queries as those demonstrated in the README:
GET /tako/repositories
Get a list of all the repositories.
This can be replaced with:
which returns:
GET /tako/repositories/?topic=serverless
Get a list of repositories, filtered by a [topic](Get a list of repositories, filtered by a topic.).
This can be replaced with:
which returns:
However…
repositoryCount: 2326
and then using a different format of query…
repositoryCount: 2394
Where did 68 missing repos go?
GitHub UI states 2.4k repositories (so the exact figure upon which that was presumably rounded up is unclear):
TODO:
tako
README examples, ascertain what is meant by"owner"
for each repo: organisation, CODEOWNERS, team, etc.