Skip to content

refactor: migrate from Google Sheets to JSON config - #26

Merged
hdcodedev merged 13 commits into
mainfrom
refactor/json-config-migration
Sep 20, 2026
Merged

hdcodedev merged 13 commits into
mainfrom
refactor/json-config-migration

Conversation

@hdcodedev

@hdcodedev hdcodedev commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

Moves the contribution list off a published Google Sheet and into a local oss-contributions.json, and changes how pull requests are fetched so none get missed.

Previously every PR had to be added to a spreadsheet by hand. Now you list the repos you contribute to and the generator finds your pull requests itself.

What changed

Config lives in the repo. oss-contributions.json replaces the Google Sheet, so changes are reviewable in git and the build no longer depends on an external URL.

Pull requests are fetched by author, not by repo. The generator asks GitHub for your own pull requests and keeps the ones in tracked repos. The previous approach listed each repo's PRs and stopped at 100, so older contributions were dropped without warning — and some were missed entirely regardless of that limit.

Private repos stay private. Private repo names are kept out of the README and out of the build log, even if one is tracked or featured.

Failures are visible. A broken config or a failed API call now fails the build, instead of quietly leaving the previous README in place.

Result

The README now lists 31 contributions across 6 projects going back to 2025, up from 17 in a single project.

Config format

{
  "username": "hdcodedev",
  "repos": ["owner/repo"],
  "statuses": ["MERGED", "OPEN"],
  "featured_projects": []
}

statuses can be empty to show everything. username is optional — without it, the owner of the GitHub token is used.

33 tests pass.

hdcodedev and others added 13 commits September 17, 2026 18:03
- Replace sheet-based config with oss-contributions.json
- Switch from per-PR gh pr view to batched gh pr list per repo
- Remove dead code: sheet.py, is_github_url(), clear_cache(), TestGithubUrl
- Fix JSON decode error to raise ValueError instead of FileNotFoundError
- Improve github.py error handling: propagate RuntimeError with details
- Deduplicate date parsing in model.py (parse once, store datetime)
- Relax REPO_PATTERN regex for valid GitHub repo names
- Fix empty statuses list to explicitly disable filtering
- Increase PR fetch limit to 100 with warning on truncation
- Update tests for new config and mock data format
@hdcodedev
hdcodedev merged commit 21e1587 into main Sep 20, 2026
1 check passed
@hdcodedev
hdcodedev deleted the refactor/json-config-migration branch September 20, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant