Skip to content

Commit 5fc3d5d

Browse files
committed
feat: auto-sync repo About section from registry.json on release
Made-with: Cursor
1 parent 8635a75 commit 5fc3d5d

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,18 @@ jobs:
7171
--generate-notes
7272
env:
7373
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
75+
- name: Sync repo About section
76+
run: |
77+
TOOLS=$(python3 -c "import json; data=json.load(open('registry.json')); print(len(data))")
78+
SKILLS=$(python3 -c "import json; data=json.load(open('registry.json')); print(sum(t.get('skills',0) for t in data))")
79+
RULES=$(python3 -c "import json; data=json.load(open('registry.json')); print(sum(t.get('rules',0) for t in data))")
80+
MCP=$(python3 -c "import json; data=json.load(open('registry.json')); print(sum(t.get('mcpTools',0) for t in data))")
81+
82+
DESC="Centralized catalog, standards, and scaffolding for ${TOOLS} TMHSDigital developer tools - ${SKILLS} skills, ${RULES} rules, ${MCP} MCP tools"
83+
84+
gh repo edit "${{ github.repository }}" \
85+
--description "$DESC" \
86+
--homepage "https://tmhsdigital.github.io/Developer-Tools-Directory/"
87+
env:
88+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

AGENTS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ Checks:
5151

5252
Has a concurrency guard -- only one release can run at a time. Commits with `[skip ci]` are ignored.
5353

54+
After creating the release, it syncs the GitHub repository About section (description and homepage) by reading live counts from `registry.json`. **Do not manually edit the repo description** -- the release workflow owns it.
55+
5456
### `release-drafter.yml` (runs on push to main and PR activity)
5557

5658
Auto-drafts release notes from merged PR titles/labels. Config in `.github/release-drafter.yml` defines categories (Features, Standards, Scaffold, Bug Fixes, Documentation, CI) and version resolution rules.
@@ -186,7 +188,7 @@ Pure documentation -- no code. Each file documents a convention derived from ana
186188

187189
- **`validate.yml`** runs on PR and push to main. It has three jobs: registry validation, docs existence checks, and scaffold syntax + dry-run test. Keep checks fast -- avoid installing unnecessary dependencies.
188190
- **`pages.yml`** deploys to GitHub Pages on push to main when `docs/`, `assets/`, or `registry.json` change. It copies `registry.json` into `docs/` and `assets/` into `docs/assets/` before uploading. Uses `actions/deploy-pages`.
189-
- **`release.yml`** auto-creates a GitHub release on push to main (excluding docs/md/standards changes). It determines the version bump from conventional commit prefixes since the last tag. Has a concurrency guard -- only one release can run at a time. Commits containing `[skip ci]` are ignored.
191+
- **`release.yml`** auto-creates a GitHub release on push to main (excluding docs/md/standards changes). It determines the version bump from conventional commit prefixes since the last tag. Has a concurrency guard -- only one release can run at a time. Commits containing `[skip ci]` are ignored. After release, it syncs the repo About section (description with live tool/skill/rule/MCP counts, homepage URL) from `registry.json`. Do not manually edit the repo description.
190192
- **`release-drafter.yml`** auto-drafts release notes from merged PR titles/labels. Config is in `.github/release-drafter.yml`. Categories: Features, Standards, Scaffold, Bug Fixes, Documentation, CI/Infrastructure. The autolabeler assigns labels based on changed file paths.
191193
- **`stale.yml`** runs weekly (Sunday midnight UTC). Issues: 60-day stale, 14-day close. PRs: 30-day stale, 14-day close. Labels exempt from staleness: `pinned`, `security`, `enhancement` (issues) and `pinned`, `security` (PRs).
192194
- **`codeql.yml`** runs Python security scanning on push/PR to main and weekly (Monday 06:00 UTC). Uses `github/codeql-action` v3.

0 commit comments

Comments
 (0)