Add script to generate release announcments. - #281
Conversation
|
good idea, with the inclusion of collaborators lately it's crying out for a bit of consistency |
30a429d to
5604772
Compare
bin/new-release-post.sh prompts for version, tag range, author, and date, then fetches the contributor list via the GitHub API and writes a ready-to-edit _posts/YYYY-MM-DD-release-X_Y_Z.md file. Assisted-by: Claude (Anthropic) Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
5604772 to
26cebee
Compare
| fetch_contributors() { | ||
| # Emits lines of the form "- [login](html_url)", sorted, deduplicated. | ||
| local old_tag="$1" new_tag="$2" | ||
| local jq_filter='.commits[].author | select(. != null) | select(.type == "User") | "\(.login)\t\(.html_url)"' |
There was a problem hiding this comment.
kroxy-robot is a user as far as github knows and shows up in the list
- [kroxylicious-robot](https://github.com/kroxylicious-robot)
|
|
||
| ask "Release version (e.g. 0.25.0)" VERSION | ||
| ask "Previous release tag (e.g. v0.24.0)" OLD_TAG | ||
| ask "New release tag or commit SHA (e.g. v0.25.0)" NEW_TAG |
There was a problem hiding this comment.
the new tag won't exist yet, maybe we should make suggest ref more strongly, or let them hit enter to default to main HEAD?
| ask "Previous release tag (e.g. v0.24.0)" OLD_TAG | ||
| ask "New release tag or commit SHA (e.g. v0.25.0)" NEW_TAG | ||
| ask "Author name" AUTHOR | ||
| ask "Author GitHub handle (without @)" AUTHOR_HANDLE |
There was a problem hiding this comment.
| ask "Author GitHub handle (without @)" AUTHOR_HANDLE | |
| ask "Author GitHub handle (without @)" AUTHOR_HANDLE "$(gh api user --jq '.login')" |
| ask "Release version (e.g. 0.25.0)" VERSION | ||
| ask "Previous release tag (e.g. v0.24.0)" OLD_TAG | ||
| ask "New release tag or commit SHA (e.g. v0.25.0)" NEW_TAG | ||
| ask "Author name" AUTHOR |
There was a problem hiding this comment.
| ask "Author name" AUTHOR | |
| ask "Author name" AUTHOR "$(git config get user.name)" |
|
|
||
| ask "Release version (e.g. 0.25.0)" VERSION | ||
| ask "Previous release tag (e.g. v0.24.0)" OLD_TAG | ||
| ask "New release tag or commit SHA (e.g. v0.25.0)" NEW_TAG |
There was a problem hiding this comment.
| ask "New release tag or commit SHA (e.g. v0.25.0)" NEW_TAG | |
| ask "New release tag or commit SHA (e.g. v0.25.0)" NEW_TAG main |
looks like this would work with the gh api call to get commits between old tag and latest main
| tags: [ "releases", "kroxylicious-proxy" ] | ||
| --- | ||
|
|
||
| # Kroxylicious ${VERSION}: <!-- TODO: one-line headline capturing the release theme --> |
There was a problem hiding this comment.
this h1 makes the thing render very loudly in the blog list
Our existing ones launch into the XYZ has snapped into existence paragraph. The title already gets set up as h1 https://kroxylicious.io/blog/kroxylicious-proxy/releases/2026/07/03/release-0_22_0.html so I think we already get the SEO benefit from the title.
|
doh, sorry didn't see the automerge set |
Summary
Adds
bin/new-release-post.sh, an interactive script that generates a Kroxylicious proxy release announcement blog post.What it does
Running
./bin/new-release-post.shprompts for:It then calls the GitHub API via
ghto fetch and inline the contributor list, and writes a ready-to-edit_posts/YYYY-MM-DD-release-X_Y_Z.mdwith all boilerplate filled in andTODOmarkers for the sections the author needs to write.Why a script rather than a template file
A template file in
_posts/has no Jekyll convention behind it and requires manual copying and renaming. A script handles filename date-stamping automatically, inlines the contributor list at generation time (removing any build-time dependency ongh), and is self-documenting via its prompts.Requirements
ghCLI installed and authenticated (gh auth status)If
ghis unavailable or the API call fails, the contributor section gets a visible<!-- TODO -->comment rather than silently producing an empty list.