[PR #1253] Feat/public GitHub metadata export #1286

Open
opened 2026-11-26 20:20:44 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1253
Author: @NinsonD
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: feat/public-github-metadata-export


📝 Commits (5)

  • 1877c30 feat(tools): add read-only public GitHub metadata exporter
  • b298eb4 test(tools): cover exporter pagination and record validation
  • 180824b docs(tools): document public metadata export and limitations
  • b61a6d6 test(tools): match exact pagination query parameter
  • 9e4b0ba Fix metadata export tests and public-only scope

📊 Changes

3 files changed (+245 additions, -0 deletions)

View changed files

➕ docs/github-metadata-export.md (+39 -0)
➕ scripts/export_github_metadata.py (+122 -0)
➕ tests/test_export_github_metadata.py (+84 -0)

📄 Description

Claimed in the coordination issue as: Not formally assigned; proposed in #563.

Related issue: #563

What and why

Added a standalone Python utility to preserve publicly accessible GitHub issue and pull request metadata.

The exporter includes:

  • Issues, pull requests, comments and PR reviews.
  • Original IDs, URLs, timestamps, descriptions and contributor attribution.
  • API pagination and rate-limit handling.
  • Duplicate-record detection and atomic JSON output.
  • Offline unit tests and usage documentation.

This is an initial proof of concept for preserving project history before considering a full migration. No external Python dependencies or game files are required. The CLI uses unauthenticated requests to limit exports to public content; GitHub's lower unauthenticated rate limit applies.

Tested

On Windows, Python 3.11.9, tested commit 9e4b0bab961244b050b31e3238a5ec342ebd3a83 using an isolated copy of the exporter and its test file:

  • python -I tests/test_export_github_metadata.py: 6 tests passed with mocked API responses and a writable workspace temporary directory.
  • The repository's line-ending detector reported no unpinned text writes in the exporter. The full repository-wide line-ending scan could not be completed against the isolated copy because the rest of the repository was not present.
  • No live API export or full repository suite was run; CI validation remains pending.

GPUs tested: N/A

AI-assisted: Yes

Checklist

  • Based on current main and verified through CI.
  • One focused contribution.
  • No game data, keys or decryption.
  • Targeted offline tests executed successfully.

Translator contract changes: N/A.

This is a proof of concept rather than a complete migration solution. Feedback on the implementation and scope is welcome.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1253 **Author:** [@NinsonD](https://github.com/NinsonD) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/public-github-metadata-export` --- ### 📝 Commits (5) - [`1877c30`](https://github.com/ubiquitarianism/leonida/commit/1877c30c3e6c61fc5746dff913c7c6970e5bf5dd) feat(tools): add read-only public GitHub metadata exporter - [`b298eb4`](https://github.com/ubiquitarianism/leonida/commit/b298eb4012a857a72f1fe7a4c748f4e0f23d590b) test(tools): cover exporter pagination and record validation - [`180824b`](https://github.com/ubiquitarianism/leonida/commit/180824ba514ac5a3cf242368cc26e8890e4053ca) docs(tools): document public metadata export and limitations - [`b61a6d6`](https://github.com/ubiquitarianism/leonida/commit/b61a6d609842a392dd76592cb57813a8d68bb4e6) test(tools): match exact pagination query parameter - [`9e4b0ba`](https://github.com/ubiquitarianism/leonida/commit/9e4b0bab961244b050b31e3238a5ec342ebd3a83) Fix metadata export tests and public-only scope ### 📊 Changes **3 files changed** (+245 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `docs/github-metadata-export.md` (+39 -0) ➕ `scripts/export_github_metadata.py` (+122 -0) ➕ `tests/test_export_github_metadata.py` (+84 -0) </details> ### 📄 Description Claimed in the coordination issue as: Not formally assigned; proposed in #563. Related issue: #563 What and why Added a standalone Python utility to preserve publicly accessible GitHub issue and pull request metadata. The exporter includes: * Issues, pull requests, comments and PR reviews. * Original IDs, URLs, timestamps, descriptions and contributor attribution. * API pagination and rate-limit handling. * Duplicate-record detection and atomic JSON output. * Offline unit tests and usage documentation. This is an initial proof of concept for preserving project history before considering a full migration. No external Python dependencies or game files are required. The CLI uses unauthenticated requests to limit exports to public content; GitHub's lower unauthenticated rate limit applies. Tested On Windows, Python 3.11.9, tested commit `9e4b0bab961244b050b31e3238a5ec342ebd3a83` using an isolated copy of the exporter and its test file: * `python -I tests/test_export_github_metadata.py`: 6 tests passed with mocked API responses and a writable workspace temporary directory. * The repository's line-ending detector reported no unpinned text writes in the exporter. The full repository-wide line-ending scan could not be completed against the isolated copy because the rest of the repository was not present. * No live API export or full repository suite was run; CI validation remains pending. GPUs tested: N/A AI-assisted: Yes Checklist * [ ] Based on current main and verified through CI. * [x] One focused contribution. * [x] No game data, keys or decryption. * [x] Targeted offline tests executed successfully. Translator contract changes: N/A. This is a proof of concept rather than a complete migration solution. Feedback on the implementation and scope is welcome. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1286
No description provided.