Skip to content

Sync stats tables to the GitHub profile README - #30

Merged
hdcodedev merged 1 commit into
mainfrom
feat/profile-stats
Oct 15, 2026
Merged

hdcodedev merged 1 commit into
mainfrom
feat/profile-stats

Conversation

@hdcodedev

Copy link
Copy Markdown
Owner

Context

The merged-PR and reported-issue tables were only visible in this repo. The profile README in hdcodedev/hdcodedev now shows the same tables, so people who open the GitHub profile see them first. The weekly run keeps both copies in step.

Implementation

  • The two stats tables are rendered once (render_stats) and used by both this README and the profile README.
  • The profile README has a block between <!-- oss-stats:start --> and <!-- oss-stats:end -->. When PROFILE_README is set, the generator replaces only that block (update_profile_readme). Missing markers fail the run.
  • The workflow checks out hdcodedev/hdcodedev into profile/, runs the generator with PROFILE_README pointing there, and pushes the profile README when it changed.
  • Added three tests in test_render.py: the marked block is replaced and the rest kept, a second run changes nothing, and missing markers raise.

Known limits

  • The workflow uses OSS_CONTRIBUTIONS_TOKEN for the profile checkout and push. If the token has no write access to hdcodedev/hdcodedev, the run fails at the checkout step and this README is not updated either. New here.

Testing

  • (agent) python3 -m unittest discover -s __test__ -p 'test_*.py': 50 tests pass.
  • (agent) Ran generate_readme.py: README.md and README_DATA.json came out identical to main.
  • (agent) Ran it with PROFILE_README set to a local copy of the profile README: the block was filled with both tables.

How to test

  1. Make sure OSS_CONTRIBUTIONS_TOKEN has Contents read and write on hdcodedev/hdcodedev.
  2. After merge, run Update README from JSON config from the Actions tab.
  3. Open https://github.com/hdcodedev. The profile shows the merged-PR table and the "📋 Issues reported by @hdcodedev" table.

@hdcodedev
hdcodedev marked this pull request as ready for review October 15, 2026 12:57
@hdcodedev
hdcodedev merged commit 7b32917 into main Oct 15, 2026
2 checks passed
@hdcodedev
hdcodedev deleted the feat/profile-stats branch October 15, 2026 12:57
hdcodedev added a commit that referenced this pull request Oct 15, 2026
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