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:
authorNinson Dobiyas <godclutch958@gmail.com>2026-11-25 00:51:30 +0400
committerNinson Dobiyas <godclutch958@gmail.com>2026-11-25 00:51:30 +0400
commit180824ba514ac5a3cf242368cc26e8890e4053ca (patch)
treef1bea5a510c5da7f68c2f4accdfacc45389f3509 /docs/github-metadata-export.md
parentb298eb4012a857a72f1fe7a4c748f4e0f23d590b (diff)
docs(tools): document public metadata export and limitations
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..e973bb9a8
--- /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
16Optional: set `GITHUB_TOKEN` to a token with access to public metadata for higher API rate limits.
17The script never prints the token. Do not commit tokens or exported private data.
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.