Conversation
There was a problem hiding this comment.
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.
gjkim42
left a comment
There was a problem hiding this comment.
How can we make agents follow the pull_request template?
.github/PULL_REQUEST_TEMPLATE.md
Outdated
| --> | ||
|
|
||
| ```release-note | ||
| NONE |
There was a problem hiding this comment.
this should be empty so that users can write their own.
|
/reset-worker |
83034d9 to
0a66c7d
Compare
hack/release-notes_test.sh
Outdated
| @@ -0,0 +1,99 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
this should be tested in CI.
There was a problem hiding this comment.
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.
hack/release-notes.sh
Outdated
| @@ -0,0 +1,132 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
Let's make a golang program for this
There was a problem hiding this comment.
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") { |
There was a problem hiding this comment.
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>
gjkim42
left a comment
There was a problem hiding this comment.
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>
7a2e0ec to
59ad039
Compare
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:
.github/PULL_REQUEST_TEMPLATE.md) with a "Which issue(s)" prompt and arelease-notefenced blockhack/release-notes/Go program that collects merged PRs between two release tags (using bounded date range), extracts release note blocks, and groups entries bykind/*labels into categories: API Changes, Features, Bug Fixes, Documentation, and Other Changesmake test).github/workflows/release.yamlto usefetch-depth: 0and run the release notes program viago runRelease Note