{"id":18085001,"url":"https://github.com/jwodder/query-issues","last_synced_at":"2025-04-06T00:13:58.522Z","repository":{"id":237711971,"uuid":"795107507","full_name":"jwodder/query-issues","owner":"jwodder","description":"Attempts at efficiently fetching open GitHub issues via GraphQL","archived":false,"fork":false,"pushed_at":"2025-02-13T22:16:13.000Z","size":186,"stargazers_count":0,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T00:21:39.883Z","etag":null,"topics":["benchmarking","github","github-graphql-api","github-issues","implementation-comparison","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jwodder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-02T15:44:04.000Z","updated_at":"2025-02-13T22:16:15.000Z","dependencies_parsed_at":"2025-01-05T19:29:02.465Z","dependency_job_id":"40c47288-7a79-4f7a-83bd-7429a42836b1","html_url":"https://github.com/jwodder/query-issues","commit_stats":null,"previous_names":["jwodder/query-issues"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fquery-issues","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fquery-issues/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fquery-issues/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fquery-issues/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwodder","download_url":"https://codeload.github.com/jwodder/query-issues/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415976,"owners_count":20935387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmarking","github","github-graphql-api","github-issues","implementation-comparison","rust"],"created_at":"2024-10-31T15:09:01.161Z","updated_at":"2025-04-06T00:13:58.512Z","avatar_url":"https://github.com/jwodder.png","language":"Rust","readme":"[![Project Status: Concept – Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept.](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept)\n[![CI Status](https://github.com/jwodder/query-issues/actions/workflows/test.yml/badge.svg)](https://github.com/jwodder/query-issues/actions/workflows/test.yml) \u003c!-- [![codecov.io](https://codecov.io/gh/jwodder/query-issues/branch/master/graph/badge.svg)](https://codecov.io/gh/jwodder/query-issues) --\u003e\n[![codecov.io](https://codecov.io/gh/jwodder/query-issues/branch/main/graph/badge.svg)](https://codecov.io/gh/jwodder/query-issues)\n[![Minimum Supported Rust Version](https://img.shields.io/badge/MSRV-1.79-orange)](https://www.rust-lang.org)\n[![MIT License](https://img.shields.io/github/license/jwodder/query-issues.svg)](https://opensource.org/licenses/MIT)\n\nThis is an experiment in determining the most efficient way to use GitHub's\nGraphQL API to fetch all open issues in all (public, non-archived, non-fork)\nrepositories belonging to a collection of owners/organizations.  Each binary\npackage in this workspace implements a different strategy, detailed below.\n\nUsage\n=====\n\n`orgs-then-issues`\n------------------\n\n    cargo run [--release] -p orgs-then-issues -- [\u003coptions\u003e] \u003cowner\u003e ...\n\n`orgs-then-issues` performs a paginated batch query to fetch all (public etc.)\nrepositories belonging to the owners specified on the command line, including\ngetting the number of open issues in each repository.  Then, all repositories\nthat have one or more open issues are queried in batches to get paginated lists\nof their open issues.\n\nWhen querying issues, the first 10 (by default) labels are retrieved for each\nissue.  If any issue has more than this many labels, the remaining labels are\nqueried in batches at this point.\n\nThe program logs to stderr the number of repositories fetched (including how\nmany had open issues), the number of open issues fetched, the elapsed time, and\n(if possible) the number of API rate limit points used.\n\n### Options\n\n- `-B \u003cint\u003e`/`--batch-size \u003cint\u003e` — Set the number of sub-queries to make per\n  GraphQL request [default: 50]\n\n- `-L \u003cint\u003e`/`--label-page-size \u003cint\u003e` — Set the number of labels to request\n  per page [default: 10]\n\n- `-o \u003cpath\u003e`/`--outfile \u003cpath\u003e` — Dump fetched issue information to the given\n  file as JSON Lines.  `\u003cpath\u003e` may be `-` to write to standard output.\n\n- `-P \u003cint\u003e`/`--page-size \u003cint\u003e` — Set the number of items to request per page\n  of results [default: 100]\n\n- `-R \u003cpath\u003e`/`--report-file \u003cpath\u003e` — Append a report of the run to the given\n  file as a JSON Lines entry\n\n\n`orgs-with-issues`\n------------------\n\n    cargo run [--release] -p orgs-with-issues -- [\u003coptions\u003e] \u003cowner\u003e ...\n\n`orgs-with-issues` performs a paginated batch query to fetch all (public etc.)\nrepositories belonging to the owners specified on the command line; for each\nrepository, the first page of open issues is also queried at the same time.\nThen, all repositories that still have more open issues are queried repeatedly\nin batches to get their remaining pages of open issues.\n\nWhen querying issues, the first 10 (by default) labels are retrieved for each\nissue.  If any issue has more than this many labels, the remaining labels are\nqueried in batches at this point.\n\nThe key difference from `orgs-then-issues` is that this command fetches an\ninitial page of issues for each repository as part of the same requests that\nfetch the repositories themselves.\n\nThe program logs to stderr the number of repositories fetched, the number of\nopen issues fetched, the elapsed time, and (if possible) the number of API rate\nlimit points used.\n\n### Options\n\n- `-B \u003cint\u003e`/`--batch-size \u003cint\u003e` — Set the number of sub-queries to make per\n  GraphQL request [default: 50]\n\n- `-L \u003cint\u003e`/`--label-page-size \u003cint\u003e` — Set the number of labels to request\n  per page [default: 10]\n\n- `-o \u003cpath\u003e`/`--outfile \u003cpath\u003e` — Dump fetched issue information to the given\n  file as JSON Lines.  `\u003cpath\u003e` may be `-` to write to standard output.\n\n- `-P \u003cint\u003e`/`--page-size \u003cint\u003e` — Set the number of items to request per page\n  of results [default: 100]\n\n- `-R \u003cpath\u003e`/`--report-file \u003cpath\u003e` — Append a report of the run to the given\n  file as a JSON Lines entry\n\n\nAuthentication\n--------------\n\nAll commands require a GitHub access token with appropriate permissions in\norder to run.  Specify the token via the `GH_TOKEN` or `GITHUB_TOKEN`\nenvironment variable or by storing a token with the\n[`gh`](https://github.com/cli/cli) command.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwodder%2Fquery-issues","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwodder%2Fquery-issues","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwodder%2Fquery-issues/lists"}