upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/github-metadata-export.md
diff options
context:
space:
mode:
authorNotRexed <therealnothingfn@gmail.com>2026-12-01 10:24:01 -0500
committerNotRexed <therealnothingfn@gmail.com>2026-12-01 10:24:01 -0500
commit0ff8a532ff9ba4ef6c94210afb46fc592cad017b (patch)
tree16c2381dff0f1730a2c077068f85f1af5b3ba960 /docs/github-metadata-export.md
parentd096ddc728380bdc7a9ff77fb470c66f9b8e72ec (diff)
parentdd7c06d95a5f80d9f2e673fcac7b96bb56128c43 (diff)
Merge remote-tracking branch 'origin/main' into push/main-1130
Diffstat (limited to 'docs/github-metadata-export.md')
-rw-r--r--docs/github-metadata-export.md39
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
3A standalone, read-only proof of concept for [issue #563](https://github.com/ubiquitarianism/leonida/issues/563).
4It queries GitHub's **public REST API** and writes JSON containing public issues, pull requests,
5issue/PR conversation comments, PR reviews, original IDs/URLs, authors, and timestamps.
6It does **not** clone repositories, download game data, or access private content.
7
8## Usage
9
10Python 3.9+; standard library only:
11
12```sh
13python scripts/export_github_metadata.py ubiquitarianism/leonida --output metadata.json
14```
15
16Requests are unauthenticated, including when `GITHUB_TOKEN` is set, so private repositories
17cannot be exported. GitHub's lower unauthenticated rate limit applies.
18
19Offline tests (mocked API; no network calls):
20
21```sh
22python -m unittest discover -s tests -p 'test_export_github_metadata.py'
23```
24
25The exporter walks public issue records (including PRs), their issue comments, and PR reviews,
26following numbered pages of up to 100 records. It prints summary counts after writing.
27On API errors or duplicate record IDs, it exits unsuccessfully without publishing a partial
28new 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.