diff options
| author | OreoFR <29048345+OreoFR@users.noreply.github.com> | 2026-12-01 17:03:17 +0100 |
|---|---|---|
| committer | OreoFR <29048345+OreoFR@users.noreply.github.com> | 2026-12-01 17:03:17 +0100 |
| commit | c648ec4bdf5a5edfe1ec423413c2a556a8c1f105 (patch) | |
| tree | 77869c78ef5ba22f470d8892b76cd30ea550fa21 /docs/github-metadata-export.md | |
| parent | 169c99060901d65f54fced35f13920e3635b1c9e (diff) | |
| parent | 0ff8a532ff9ba4ef6c94210afb46fc592cad017b (diff) | |
Merge remote-tracking branch 'origin/main' into fix/ahead-split-kept-thread
# Conflicts:
# d3d12/docs/switches.md
Diffstat (limited to 'docs/github-metadata-export.md')
| -rw-r--r-- | docs/github-metadata-export.md | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/docs/github-metadata-export.md b/docs/github-metadata-export.md new file mode 100644 index 000000000..bd59eea1a --- /dev/null +++ b/docs/github-metadata-export.md | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | # Public GitHub metadata exporter | ||
| 2 | |||
| 3 | A standalone, read-only proof of concept for [issue #563](https://github.com/ubiquitarianism/leonida/issues/563). | ||
| 4 | It queries GitHub's **public REST API** and writes JSON containing public issues, pull requests, | ||
| 5 | issue/PR conversation comments, PR reviews, original IDs/URLs, authors, and timestamps. | ||
| 6 | It does **not** clone repositories, download game data, or access private content. | ||
| 7 | |||
| 8 | ## Usage | ||
| 9 | |||
| 10 | Python 3.9+; standard library only: | ||
| 11 | |||
| 12 | ```sh | ||
| 13 | python scripts/export_github_metadata.py ubiquitarianism/leonida --output metadata.json | ||
| 14 | ``` | ||
| 15 | |||
| 16 | Requests are unauthenticated, including when `GITHUB_TOKEN` is set, so private repositories | ||
| 17 | cannot be exported. GitHub's lower unauthenticated rate limit applies. | ||
| 18 | |||
| 19 | Offline tests (mocked API; no network calls): | ||
| 20 | |||
| 21 | ```sh | ||
| 22 | python -m unittest discover -s tests -p 'test_export_github_metadata.py' | ||
| 23 | ``` | ||
| 24 | |||
| 25 | The exporter walks public issue records (including PRs), their issue comments, and PR reviews, | ||
| 26 | following numbered pages of up to 100 records. It prints summary counts after writing. | ||
| 27 | On API errors or duplicate record IDs, it exits unsuccessfully without publishing a partial | ||
| 28 | new output file. A pre-existing output file remains unchanged on failure. | ||
| 29 | |||
| 30 | ## Limitations | ||
| 31 | |||
| 32 | * This is **not** a Radicle importer or a full GitHub archive. It excludes review-thread | ||
| 33 | comments, commit discussions, attachments, labels, milestones, events, deleted records, | ||
| 34 | private issues, and content inaccessible through the public API. | ||
| 35 | * The export is not a transactional snapshot: discussions may change while pagination runs. | ||
| 36 | Counts validate what was retrieved, **not** completeness against GitHub's live totals. | ||
| 37 | * GitHub secondary rate limits may require rerunning the export; the retry budget is bounded. | ||
| 38 | * Only export information you are authorized to access. Review retention and privacy needs | ||
| 39 | before publishing the JSON output. | ||