Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Jan 11, 2026

Summary

End-to-end improvements to how release notes are generated and presented:

  1. @changesets/changelog-github — CHANGELOG.md entries now include PR links, commit hashes, and author attribution
  2. Changeset template & guidance — Comprehensive README for consistent, user-friendly changeset descriptions
  3. AI-powered release notes — New workflow transforms raw changelog into polished GitHub Release notes

Pipeline Flow

Contributor writes changeset (using template)
        ↓
PR merges → CHANGELOG.md gets PR/author links
        ↓
Version PR merges → GitHub Release created
        ↓
polish-release-notes.yml → User-friendly release notes

Changes

Changelog Generation

  • Switch to @changesets/changelog-github for automatic PR/author links
  • Remove release:local script (CI-only releases)

Changeset Guidance

  • Added template with standard categories (New Features, Bug Fixes, Breaking Changes, etc.)
  • Version bump guide and "when to create a changeset" guidance
  • Do/don't examples for writing good descriptions

Release Notes Polish (new workflow)

  • Triggers on release: published
  • Uses Claude Code Action to transform changelog → release notes
  • Generates title like v0.18.0 - OPSX Experimental Workflow
  • Removes noise (commit hashes, PR numbers, internal changes)
  • Requires CLAUDE_CODE_OAUTH_TOKEN secret

Setup Required

For the polish workflow to work:

claude setup-token

Then add CLAUDE_CODE_OAUTH_TOKEN to GitHub repository secrets.

Test plan

  • pnpm changeset still works locally
  • Verify next release generates changelog with PR/author links
  • Verify polish workflow transforms release notes correctly

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Expanded the changesets guide into a full user-facing README with quick start, workflow, templates, version-bump guidance, and tips for writing good change descriptions.
  • Chores

    • Switched changelog generation to a GitHub-targeted generator.
    • Removed a local release script and added a dev dependency for changelog handling.
    • Added an automated workflow to polish and publish release notes.

✏️ Tip: You can customize this high-level summary in your review settings.

- Switch to @changesets/changelog-github for PR/author links in CHANGELOG.md
- Add comprehensive changeset README with template and contributor guidance
- Remove release:local script (CI-only releases)
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 11, 2026

📝 Walkthrough

Walkthrough

Expanded Changesets documentation, switched Changesets changelog config to GitHub adapter with repository context, removed a local release script and added the GitHub changelog package, and introduced a GitHub Actions workflow that polishes release notes using Claude and updates GitHub Releases.

Changes

Cohort / File(s) Summary
Changesets Documentation
\.changeset/README.md
Replaced brief note with full user-facing README: Quick Start, Workflow, Template, Version Bump Guide, Notes, and guidance for writing descriptions.
Changesets Config
\.changeset/config.json
changelog changed from "@changesets/cli/changelog" to ["@changesets/changelog-github", { "repo": "Fission-AI/OpenSpec" }].
Package Manifest
package.json
Removed release:local script; added devDependency @changesets/changelog-github ^0.5.2.
CI / Release Automation
.github/workflows/polish-release-notes.yml
Added new workflow triggered on release: fetches release body, calls Claude via action to generate polished title & notes, and updates GitHub Release conditionally.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub (release event)
  participant Runner as Actions Runner
  participant Repo as Repository (checkout)
  participant GHCLI as gh CLI
  participant Claude as Claude Code Action
  participant GitHubAPI as GitHub Releases API

  GH->>Runner: release published (tag)
  Runner->>Repo: actions/checkout
  Runner->>GHCLI: gh release view --json body --repo ...
  GHCLI-->>Runner: release body
  Runner->>Claude: send prompt + release body (CLAUDE_CODE_OAUTH_TOKEN)
  Claude-->>Runner: release-title.txt + polished-notes.md
  alt both files exist
    Runner->>GitHubAPI: update release title and body (GITHUB_TOKEN)
  else only polished-notes.md
    Runner->>GitHubAPI: update release body (preserve title)
  else neither
    Runner-->>GH: no change
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰
I hopped through docs, a jaunty sight,
Polished notes now gleam so bright,
Configs swapped and scripts refined,
Releases shimmer—neat and kind. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'chore: improve release notes pipeline' is partially related to the changeset but overly broad; it emphasizes release notes polish while the main change is switching changelog generation to GitHub integration with enhanced changeset documentation. Consider a more specific title like 'chore: integrate GitHub changelog generation and improve changeset documentation' to better reflect the primary technical change.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vibe-kanban-cloud
Copy link

Review Complete

Your review story is ready!

View Story

Comment !reviewfast on this PR to re-generate the story.

Transforms raw changelog into user-friendly release notes when a
GitHub Release is published. Uses Claude Code Action to:
- Generate concise release title (e.g., "v0.18.0 - OPSX Workflow")
- Rewrite changelog as developer-friendly release notes
- Remove noise (commit hashes, PR numbers, internal changes)

Requires CLAUDE_CODE_OAUTH_TOKEN secret (from claude setup-token).
@TabishB TabishB changed the title chore: improve changelog generation with GitHub integration chore: improve release notes pipeline Jan 11, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.changeset/README.md (1)

53-74: Consider a brief note on “tooling changes” when they affect release outputs.
Since this repo’s tooling can change published artifacts (e.g., changelog formatting), you may want to clarify whether release-process/tooling changes should get a changeset when they affect end users.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0e1b07 and 2c3bcfa.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • .changeset/README.md
  • .changeset/config.json
  • package.json
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-11-25T01:08:19.004Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: openspec/AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:19.004Z
Learning: Applies to openspec/changes/*/proposal.md : Ensure `proposal.md` includes sections: Why (1-2 sentences), What Changes (bullet list with breaking change markers), and Impact (affected specs and code)

Applied to files:

  • .changeset/README.md
📚 Learning: 2025-11-25T01:08:02.839Z
Learnt from: CR
Repo: Fission-AI/OpenSpec PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T01:08:02.839Z
Learning: Use `@/openspec/AGENTS.md` to learn how to create and apply change proposals, spec format and conventions, and project structure and guidelines

Applied to files:

  • .changeset/README.md
🔇 Additional comments (5)
.changeset/README.md (3)

21-52: Changeset template looks good and user-oriented.
The structure (frontmatter + user-facing sections) is pragmatic and should produce higher-quality changelog entries.


75-95: “Do/Don’t” examples are effective.
Nice guidance that will prevent low-signal entries like “Fixed #123” (Lines 92-95).


1-20: ✓ Workflow automation is correctly configured and matches the documentation.

Verification confirms that release-prepare.yml implements the described flow: it runs on pushes to main and uses changesets/action@v1 to open/update the Version Packages PR and publish when merged (via pnpm run release:ci). The createGithubReleases: true setting creates GitHub releases automatically. The documented workflow is accurate and no changes are needed.

package.json (1)

63-63: Ensure CI has GITHUB_TOKEN permissions for changelog generation.
The @changesets/changelog-github v0.5.2 package exists and is compatible with your current @changesets/cli and Node versions. For changelog generation to succeed, your CI environment must have GITHUB_TOKEN with the necessary permissions for PR/commit lookups during changeset version.

.changeset/config.json (1)

3-6: Ensure CI GITHUB_TOKEN has the required scopes for changelog generation.
The repo: "Fission-AI/OpenSpec" format is correct. However, verify that your CI workflow grants the GITHUB_TOKEN at minimum these permissions: contents: write (to update files and create refs) and pull-requests: write (to create the release PR). Without these scopes, changelog generation will fail.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/polish-release-notes.yml:
- Line 32: Add the repository secret named CLAUDE_CODE_OAUTH_TOKEN (exactly that
name) in GitHub > Settings > Secrets and variables > Actions so the workflow can
access it; create a new repository secret, paste the Anthropic/Claude Code OAuth
token as the value, save it, and ensure any CI users who need to update it have
the token source and rotation policy (do not hardcode the token into the repo).
🧹 Nitpick comments (1)
.github/workflows/polish-release-notes.yml (1)

122-137: LGTM: Robust fallback logic handles partial failures gracefully.

The conditional file checks ensure the release is only updated when Claude successfully generates output, with appropriate fallbacks for each scenario.

💡 Optional: Add debugging output for troubleshooting

Consider logging the generated files for easier debugging if the action doesn't behave as expected:

       - name: Update release
         env:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         run: |
           TAG="${{ github.event.release.tag_name }}"
+          
+          echo "Generated files:"
+          ls -la *.md *.txt 2>/dev/null || echo "No output files found"

           if [ -f "polished-notes.md" ] && [ -f "release-title.txt" ]; then
+            echo "Title: $(cat release-title.txt)"
             TITLE=$(cat release-title.txt)
             gh release edit "$TAG" --title "$TITLE" --notes-file polished-notes.md
             echo "Updated: $TITLE"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2c3bcfa and b03ae1a.

📒 Files selected for processing (1)
  • .github/workflows/polish-release-notes.yml
🧰 Additional context used
🪛 actionlint (1.7.10)
.github/workflows/polish-release-notes.yml

34-34: input "direct_prompt" is not defined in action "anthropics/claude-code-action@v1". available inputs are "additional_permissions", "allowed_bots", "allowed_non_write_users", "anthropic_api_key", "assignee_trigger", "base_branch", "bot_id", "bot_name", "branch_prefix", "claude_args", "claude_code_oauth_token", "github_token", "label_trigger", "path_to_bun_executable", "path_to_claude_code_executable", "plugin_marketplaces", "plugins", "prompt", "settings", "show_full_output", "track_progress", "trigger_phrase", "use_bedrock", "use_commit_signing", "use_foundry", "use_sticky_comment", "use_vertex"

(action)

🔇 Additional comments (5)
.github/workflows/polish-release-notes.yml (5)

1-10: LGTM: Workflow trigger and permissions are correctly configured.

The release: published trigger and contents: write permission are appropriate for modifying release notes.


11-18: LGTM: Repository check prevents unintended fork execution.

The repository guard and checkout setup follow best practices.


20-27: LGTM: Release body retrieval is correctly implemented.

The use of gh release view with proper token authentication and tag reference is appropriate.


1-137: Excellent automation approach for release note polishing.

This workflow effectively automates the transformation of raw changelogs into polished, developer-friendly release notes. The comprehensive prompt with clear voice guidelines, formatting rules, and examples ensures consistent output quality. Once the critical direct_prompt issue is fixed, this will be a valuable addition to the release workflow.


28-121: Critical: Two input parameters are incompatible with anthropics/claude-code-action@v1.

The action v1 removed the direct_prompt and claude_code_oauth_token inputs in favor of prompt and anthropic_api_key. The workflow will fail without these corrections.

🔧 Fix both input parameter names
       - name: Transform release notes with Claude
         uses: anthropics/claude-code-action@v1
         id: claude
         with:
-          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
+          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
           github_token: ${{ secrets.GITHUB_TOKEN }}
-          direct_prompt: |
+          prompt: |
             Transform the changelog in `current-notes.md` into release notes for OpenSpec ${{ github.event.release.tag_name }}.

Update the secrets configuration accordingly: rename CLAUDE_CODE_OAUTH_TOKEN to ANTHROPIC_API_KEY in your repository settings.

Likely an incorrect or invalid review comment.

uses: anthropics/claude-code-action@v1
id: claude
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# First, let's look at the workflow file to understand the context
echo "=== Examining the workflow file ==="
cat .github/workflows/polish-release-notes.yml

Repository: Fission-AI/OpenSpec

Length of output: 4518


🏁 Script executed:

#!/bin/bash
# Search for documentation about CLAUDE_CODE_OAUTH_TOKEN
echo "=== Searching for CLAUDE_CODE_OAUTH_TOKEN documentation ==="
rg -i "CLAUDE_CODE_OAUTH_TOKEN" -C 3

echo -e "\n=== Searching for setup instructions ==="
find . -type f \( -name "README*" -o -name "CONTRIBUTING*" -o -name "SETUP*" -o -name "*.md" \) | head -20 | xargs rg -i "secret" --type md -C 2 2>/dev/null || echo "No matches found"

Repository: Fission-AI/OpenSpec

Length of output: 352


🏁 Script executed:

#!/bin/bash
# Check if there's any CI configuration or environment setup documentation
echo "=== Looking for CI/setup documentation ==="
git ls-files | grep -E "(\.github|setup|config|README|CONTRIBUTING)" | head -30

Repository: Fission-AI/OpenSpec

Length of output: 1570


Ensure the CLAUDE_CODE_OAUTH_TOKEN secret is configured in repository settings.

This workflow requires a repository secret named CLAUDE_CODE_OAUTH_TOKEN to authenticate with Claude via the Anthropic Claude Code Action. This token must be set up in the repository's secrets before the workflow can execute on release publication.

🤖 Prompt for AI Agents
In @.github/workflows/polish-release-notes.yml at line 32, Add the repository
secret named CLAUDE_CODE_OAUTH_TOKEN (exactly that name) in GitHub > Settings >
Secrets and variables > Actions so the workflow can access it; create a new
repository secret, paste the Anthropic/Claude Code OAuth token as the value,
save it, and ensure any CI users who need to update it have the token source and
rotation policy (do not hardcode the token into the repo).

@TabishB TabishB merged commit 36078b1 into main Jan 11, 2026
7 checks passed
@TabishB TabishB deleted the changeset-github-changelog branch January 11, 2026 06:33
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