Skip to content

Add categorized release notes tool#521

Merged
gjkim42 merged 1 commit intomainfrom
kelos-task-519
Mar 3, 2026
Merged

Add categorized release notes tool#521
gjkim42 merged 1 commit intomainfrom
kelos-task-519

Conversation

@kelos-bot
Copy link

@kelos-bot kelos-bot bot commented Mar 2, 2026

Which issue(s) this PR is related to:

Fixes #519

Description

Add a Go program for generating categorized release notes from merged PR descriptions, replacing the default auto-generated flat notes.

Changes:

  • Add a minimal PR template (.github/PULL_REQUEST_TEMPLATE.md) with a "Which issue(s)" prompt and a release-note fenced block
  • Add hack/release-notes/ Go program that collects merged PRs between two release tags (using bounded date range), extracts release note blocks, and groups entries by kind/* labels into categories: API Changes, Features, Bug Fixes, Documentation, and Other Changes
  • Add unit tests for note extraction, NONE detection, and formatting logic (covered by make test)
  • Update .github/workflows/release.yaml to use fetch-depth: 0 and run the release notes program via go run

Release Note

Added categorized release notes generated from PR descriptions, grouped by kind/* labels

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

4 issues found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/release.yaml">

<violation number="1" location=".github/workflows/release.yaml:64">
P0: The `release-notes.sh` script requires full git history (it runs `git tag --list` and `git merge-base`), but the workflow's `actions/checkout@v4` step uses the default shallow clone (`fetch-depth: 1`). This will cause the step to fail on every tag push because tags and history are not available.

Add `fetch-depth: 0` to the checkout step, or add a separate step before this one to fetch tags and history (e.g., `git fetch --prune --unshallow --tags`).</violation>
</file>

<file name="hack/release-notes.sh">

<violation number="1" location="hack/release-notes.sh:41">
P2: Missing upper-bound on the merged-date search query. PRs merged after the `VERSION` tag was created will be incorrectly included in these release notes. Add a `merged:<=<version-tag-date>` filter to scope the query to the correct release window.</violation>

<violation number="2" location="hack/release-notes.sh:79">
P2: Using `echo` with untrusted PR content is fragile — if `note` is `-n`, `-e`, or `-E`, bash's `echo` interprets it as a flag and produces incorrect output. Prefer `printf '%s\n'` or a here-string (`<<<`).</violation>
</file>

<file name="hack/release-notes_test.sh">

<violation number="1" location="hack/release-notes_test.sh:28">
P2: Test duplicates the extraction logic from `hack/release-notes.sh` instead of sourcing it. If the production `sed` expression changes, these tests will still pass against the stale copy, masking regressions. Consider refactoring the extraction into a small sourced helper (e.g., `hack/release-notes-lib.sh`) that both the main script and the test import, or have the test invoke the production script's extraction path directly.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Collaborator

@gjkim42 gjkim42 left a comment

Choose a reason for hiding this comment

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

How can we make agents follow the pull_request template?

-->

```release-note
NONE
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should be empty so that users can write their own.

@gjkim42
Copy link
Collaborator

gjkim42 commented Mar 2, 2026

/reset-worker

@gjkim42 gjkim42 added priority/important-longterm triage-accepted kind/feature Categorizes issue or PR as related to a new feature labels Mar 2, 2026
@github-actions github-actions bot removed needs-triage needs-kind Indicates an issue or PR lacks a kind/* label needs-priority labels Mar 2, 2026
Copy link
Collaborator

@gjkim42 gjkim42 left a comment

Choose a reason for hiding this comment

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

lgtm
/squash-commits

@kelos-bot kelos-bot bot force-pushed the kelos-task-519 branch from 83034d9 to 0a66c7d Compare March 2, 2026 13:21
@gjkim42 gjkim42 enabled auto-merge March 2, 2026 13:25
@gjkim42 gjkim42 disabled auto-merge March 2, 2026 13:25
Copy link
Collaborator

@gjkim42 gjkim42 left a comment

Choose a reason for hiding this comment

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

/reset-worker

@@ -0,0 +1,99 @@
#!/usr/bin/env bash
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should be tested in CI.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/ci.yaml">

<violation number="1" location=".github/workflows/ci.yaml:65">
P2: This is the only CI step that directly invokes a script instead of using a Makefile target, breaking the project's established convention. Consider adding a Makefile target (e.g., `test-release-notes`) and using `make test-release-notes` here to stay consistent with the rest of the workflow.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Collaborator

@gjkim42 gjkim42 left a comment

Choose a reason for hiding this comment

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

/reset-worker

@@ -0,0 +1,132 @@
#!/usr/bin/env bash
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's make a golang program for this

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 7 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="hack/release-notes/main.go">

<violation number="1" location="hack/release-notes/main.go:148">
P1: Bug: `findPreviousTag` returns the wrong tag when `version` is not the latest release. The function returns the first tag that isn't `version` in descending order, which is always the latest tag — not the one immediately before `version`. For example, generating notes for `v1.2.1` when `v1.3.0` exists would compare against `v1.3.0` instead of `v1.2.0`. Fix: iterate until you find `version`, then return the next tag.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

if err != nil {
return "", fmt.Errorf("listing tags: %w", err)
}
for _, tag := range strings.Split(strings.TrimSpace(out), "\n") {
Copy link

@cubic-dev-ai cubic-dev-ai bot Mar 2, 2026

Choose a reason for hiding this comment

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

P1: Bug: findPreviousTag returns the wrong tag when version is not the latest release. The function returns the first tag that isn't version in descending order, which is always the latest tag — not the one immediately before version. For example, generating notes for v1.2.1 when v1.3.0 exists would compare against v1.3.0 instead of v1.2.0. Fix: iterate until you find version, then return the next tag.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At hack/release-notes/main.go, line 148:

<comment>Bug: `findPreviousTag` returns the wrong tag when `version` is not the latest release. The function returns the first tag that isn't `version` in descending order, which is always the latest tag — not the one immediately before `version`. For example, generating notes for `v1.2.1` when `v1.3.0` exists would compare against `v1.3.0` instead of `v1.2.0`. Fix: iterate until you find `version`, then return the next tag.</comment>

<file context>
@@ -0,0 +1,265 @@
+	if err != nil {
+		return "", fmt.Errorf("listing tags: %w", err)
+	}
+	for _, tag := range strings.Split(strings.TrimSpace(out), "\n") {
+		tag = strings.TrimSpace(tag)
+		if tag != "" && tag != version {
</file context>
Fix with Cubic

Copy link
Collaborator

@gjkim42 gjkim42 left a comment

Choose a reason for hiding this comment

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

Fix findPreviousTag ans squash commits.
/reset-worker

- Add a minimal PR template (.github/PULL_REQUEST_TEMPLATE.md) with a
  "Which issue(s)" prompt and a release-note fenced block
- Add hack/release-notes/ Go program that collects merged PRs between
  two release tags (using bounded date range), extracts release note
  blocks, and groups entries by kind/* labels into categories: API
  Changes, Features, Bug Fixes, Documentation, and Other Changes
- Add unit tests for note extraction, NONE detection, and formatting
  logic
- Update .github/workflows/release.yaml to use fetch-depth: 0 and run
  the release notes program via go run

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kelos-bot kelos-bot bot force-pushed the kelos-task-519 branch from 7a2e0ec to 59ad039 Compare March 2, 2026 15:47
@kelos-bot kelos-bot bot changed the title Add categorized release notes from PR descriptions Add categorized release notes tool Mar 2, 2026
@gjkim42 gjkim42 added this pull request to the merge queue Mar 3, 2026
Merged via the queue into main with commit df8751b Mar 3, 2026
8 checks passed
@gjkim42 gjkim42 deleted the kelos-task-519 branch March 3, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add categorized release notes from PR descriptions

1 participant