Skip to content

Add script to generate release announcments. - #281

Merged
SamBarker merged 2 commits into
kroxylicious:mainfrom
SamBarker:feat/blog-template
Sep 6, 2026
Merged

Add script to generate release announcments.#281
SamBarker merged 2 commits into
kroxylicious:mainfrom
SamBarker:feat/blog-template

Conversation

@SamBarker

Copy link
Copy Markdown
Member

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.sh prompts for:

  • Release version
  • Previous release tag and new release tag/SHA (used to compute the contributor list)
  • Author name and GitHub handle
  • Post date (defaults to today)

It then calls the GitHub API via gh to fetch and inline the contributor list, and writes a ready-to-edit _posts/YYYY-MM-DD-release-X_Y_Z.md with all boilerplate filled in and TODO markers 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 on gh), and is self-documenting via its prompts.

Requirements

  • gh CLI installed and authenticated (gh auth status)
  • bash 4+ (or zsh)

If gh is unavailable or the API call fails, the contributor section gets a visible <!-- TODO --> comment rather than silently producing an empty list.

@SamBarker
SamBarker requested a review from a team as a code owner September 3, 2026 07:10
@SamBarker SamBarker changed the title Add release post generator script Add script to generate release announcments. Sep 6, 2026
@robobario

Copy link
Copy Markdown
Member

good idea, with the inclusion of collaborators lately it's crying out for a bit of consistency

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>

@robobario robobario left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nits

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)"'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 -->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this h1 makes the thing render very loudly in the blog list

Image

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.

@SamBarker
SamBarker merged commit ceb9c4e into kroxylicious:main Sep 6, 2026
2 checks passed
@robobario

Copy link
Copy Markdown
Member

doh, sorry didn't see the automerge set

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.

2 participants