Skip to content

feat: add monthly org profile README rotation - #37

Merged
chtruong814 merged 10 commits into
mainfrom
chtruong/automate-pins
Nov 7, 2026
Merged

chtruong814 merged 10 commits into
mainfrom
chtruong/automate-pins

Conversation

@chtruong814

Copy link
Copy Markdown
Contributor

Summary

Adds a GitHub Action that regenerates the org profile README (profile/README.md) on a schedule and pushes it to this repo, following the design in the internal nemo-org-profile mock-up.

  • scripts/rotate_readme.py (stdlib only): fetches public org repos, picks six featured repos per month, fills profile/README.template.md, validates, and refreshes profile/repositories.json. Failure leaves the last good README in place.
  • rotation/state.json: rotation order, cursor and per-month history, seeded from the agreed schedule (Nov 2026 starts with Safe-Synthesizer, Switchyard, eval-author, labs-molt, Lens, Nemotron). Reruns in the same month reuse the selection.
  • rotation/config.json: exclusions (infra repos, excluded by request, inactive) and display-name overrides.
  • .github/workflows/rotate-profile-readme.yml: runs Mondays 14:00 UTC (first Monday of the month starts the rotation; other runs refresh descriptions and the catalog) plus workflow_dispatch. Uses only GITHUB_TOKEN with contents: write; actions pinned by SHA.
  • Banner and category SVG assets, template, and initial generated README and catalog.

Notes

  • Descriptions come from each repo's About text and refresh on the next run.
  • Category chips come from nemo-* topics. None are applied yet, so cards show no chips until repo admins add them.
  • Card display names are guessed from repo names; override in rotation/config.json once final copy is available.
  • The workflow pushes directly to main; branch protection may need a bypass for the bot, or a PR-based variant.
  • workflow_dispatch is not usable until this is on main, so the workflow has not run on GitHub. The script was tested locally against the live API, including an 8-month simulation matching the planned schedule.
  • Relative assets/... image paths in the profile README should be verified on the live org page.

Test plan

  • Review rendered profile/README.md against the mock-up
  • After merge, run the workflow manually with dry_run, then once for real
  • Confirm the push to main succeeds under branch protection
  • Verify the org profile page renders the banner and cards

🤖 Generated with Claude Code

Add a scheduled workflow that refreshes the public repo catalog and renders
profile/README.md with six featured repositories per month, following the
nemo-org-profile mock-up. Rotation order is seeded from the agreed schedule
and kept in rotation/state.json.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
chtruong814 and others added 9 commits November 2, 2026 20:34
Fill template placeholders in a single pass so braces in repo descriptions
cannot abort the run. Run the workflow in dry-run mode on pull requests that
touch it, and only commit on schedule or non-dry-run manual dispatch.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Advance the cursor by a fixed batch size instead of past the last pick, and
fill any shortfall from positions after the window without moving the cursor.
A replacement no longer shifts later months' batches.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Mint a GitHub App token for scheduled and manual non-dry-run runs and use it
for checkout and push so the bot's branch protection bypass applies. Reduce
the workflow GITHUB_TOKEN to contents: read.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Remove the banner, intro, Explore libraries and For agents sections from the
template so the profile shows only the monthly featured repositories.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Add CODEOWNERS entries for scripts/ and rotation/ so changes to the code and
state that run with the bot token need a review from @NVIDIA-NeMo/automation.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Reject non-dry-run --date values outside the current UTC month, fail instead of
publishing an empty README or crashing on an empty order, only push from main
(other refs and PRs run in dry-run mode), and retry the push with a rebase.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Scheduled runs always use today's date and real runs reject other months, so
the manual date input only added risk. The script keeps --date for local
testing.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Add DFM to the explicit exclusions, set excluded_from_featured when a repo is
excluded by the topic or by rotation/config.json, and add license_overrides for
repos whose LICENSE files declare Apache-2.0 but which GitHub reports as
NOASSERTION. Overrides only fill gaps and are marked as manual in the catalog.
Refresh the catalog.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Add the NVIDIA SPDX copyright and Apache-2.0 header to the rotation script and
workflow, matching the header used in other NeMo repos.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
@chtruong814
chtruong814 merged commit d6ee0af into main Nov 7, 2026
1 check passed
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