Skip to content

Commit 2166856

Browse files
PEZCopilot
andcommitted
Auto-generate plugins table in README from marketplace.json
Revert changelog update Co-authored-by: Copilot <copilot@github.com>
1 parent 77d5f60 commit 2166856

5 files changed

Lines changed: 45 additions & 9 deletions

File tree

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ This is a VS Code Copilot plugin marketplace repo — pure content (markdown, JS
1010

1111
## Changelog
1212

13-
Maintain `CHANGELOG.md` using [Keep a Changelog](https://keepachangelog.com/) format. Every user-visible change gets an entry under `## [Unreleased]` before committing.
13+
Maintain `CHANGELOG.md` using [Keep a Changelog](https://keepachangelog.com/) format. Only plugin-related changes get entries — new plugins, removed plugins, updated skills/agents, and changed instructions. Infrastructure changes (CI, scripts, README generation) do not belong in the changelog.
1414

15-
- New plugins, removed plugins, updated skills/agents, changed instructions — all go in the changelog.
15+
- Add entries under `## [Unreleased]` before committing.
1616
- Entries are bullet points. Link issues when relevant.
1717
- The publish pipeline moves unreleased entries to a versioned section automatically — just keep `## [Unreleased]` tended.
1818

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
6464
- name: Commit release
6565
run: |
66-
git add CHANGELOG.md .github/plugin/marketplace.json
66+
git add CHANGELOG.md .github/plugin/marketplace.json README.md
6767
git commit -m "Release v${{ steps.version.outputs.version }}"
6868
6969
- name: Tag

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,15 @@ You can of course just copy the content of anything you want on your machine(s)
4040

4141
## Plugins
4242

43+
<!-- plugins-table-start -->
4344
| Plugin | Description |
4445
|---|---|
45-
| `clojure` | REPL-first Clojure development — agent and skill for any dialect and runtime |
46-
| `clojure-editor` | Subagent for editing Clojure files using Backseat Driver structural editing tools |
47-
| `babashka` | Babashka scripting and bb.edn task skills for idiomatic Babashka development + babashka tasks |
48-
| `epupp` | Browser tampering and userscript development with Epupp, ClojureScript/Scittle in any browser page you need it. (Which in my case is all the pages!) |
46+
| `clojure` | REPL-first Clojure development — agent and skill for any dialect and runtime. |
47+
| `clojure-editor` | Subagent for editing Clojure files using Backseat Driver structural editing tools. |
48+
| `babashka` | Babashka scripting and bb.edn task skills for idiomatic Babashka development. |
49+
| `epupp` | Browser tampering and userscript development with Epupp (ClojureScript/Scittle in the browser). |
50+
| `joyride` | Joyride scripting for VS Code — ensures Joyride extension skills are loaded before working with Joyride. |
51+
<!-- plugins-table-end -->
4952

5053
## Instructions
5154

bb.edn

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@
99
publish {:doc "Validate and push a [publish] marker commit to trigger CI release"
1010
:task (publish/publish! {:dry-run (some #{"--dry-run"} *command-line-args*)})}
1111

12-
ci-release {:doc "CI-only: update changelog and version for a release"
12+
ci-release {:doc "CI-only: update changelog, version, and README for a release"
1313
:task (let [version (first *command-line-args*)]
1414
(when-not version
1515
(println "Usage: bb ci-release <version>")
1616
(System/exit 1))
17-
(publish/ci-release! version))}
17+
(publish/ci-release! version)
18+
(publish/update-readme!))}
19+
20+
update-readme {:doc "Regenerate the plugins table in README.md from marketplace.json"
21+
:task (publish/update-readme!)}
1822

1923
bump-version {:doc "CI-only: bump marketplace version without changelog changes"
2024
:task (let [version (first *command-line-args*)]

scripts/publish.clj

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,32 @@
179179
new-marketplace (update-marketplace-version marketplace-content version)]
180180
(spit marketplace-path new-marketplace)
181181
(println (str "Bumped " marketplace-path " to v" version))))
182+
183+
;; ============================================================
184+
;; README generation
185+
;; ============================================================
186+
187+
(defn generate-plugins-table
188+
"Generates a markdown table of plugins from marketplace.json."
189+
[]
190+
(let [marketplace (json/parse-string (slurp marketplace-path) true)
191+
plugins (:plugins marketplace)
192+
header "| Plugin | Description |\n|---|---|"
193+
rows (mapv (fn [{:keys [name description]}]
194+
(str "| `" name "` | " description " |"))
195+
plugins)]
196+
(str header "\n" (string/join "\n" rows))))
197+
198+
(defn update-readme!
199+
"Updates the plugins table in README.md between marker comments."
200+
[]
201+
(let [readme (slurp "README.md")
202+
table (generate-plugins-table)
203+
updated (string/replace readme
204+
#"(?s)<!-- plugins-table-start -->\n.*?\n<!-- plugins-table-end -->"
205+
(str "<!-- plugins-table-start -->\n" table "\n<!-- plugins-table-end -->"))]
206+
(if (= readme updated)
207+
(println "README.md plugins table: no markers found, skipping.")
208+
(do
209+
(spit "README.md" updated)
210+
(println "README.md plugins table updated.")))))

0 commit comments

Comments
 (0)