Skip to content

Commit fd4e33d

Browse files
ashwin-antclaude
andauthored
feat: add /generate-changelog slash command (#287)
Move changelog generation prompt from publish.yml into a reusable slash command at .claude/commands/generate-changelog.md. Update workflow to call the command with version parameters. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent 68eb68b commit fd4e33d

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
allowed-tools: Edit, Bash(git add:*), Bash(git commit:*)
3+
description: Generate changelog for a new release version
4+
---
5+
6+
You are updating the changelog for the new release.
7+
8+
Update CHANGELOG.md to add a new section for the new version at the top of the file, right after the '# Changelog' heading.
9+
10+
Review the recent commits and merged pull requests since the last release to generate meaningful changelog content for the new version. Follow the existing format in CHANGELOG.md with sections like:
11+
- Breaking Changes (if any)
12+
- New Features
13+
- Bug Fixes
14+
- Documentation
15+
- Internal/Other changes
16+
17+
Include only the sections that are relevant based on the actual changes. Write clear, user-focused descriptions.
18+
19+
After updating CHANGELOG.md, commit the changes with the message "docs: update changelog for v{new_version}".

.github/workflows/publish.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -133,21 +133,7 @@ jobs:
133133
continue-on-error: true
134134
uses: anthropics/claude-code-action@v1
135135
with:
136-
prompt: |
137-
You are updating the changelog for the new release v${{ env.VERSION }}.
138-
139-
Update CHANGELOG.md to add a new section for version ${{ env.VERSION }} at the top of the file, right after the '# Changelog' heading.
140-
141-
Review the recent commits and merged pull requests since the last release (${{ steps.previous_tag.outputs.previous_tag }}) to generate meaningful changelog content for v${{ env.VERSION }}. Follow the existing format in CHANGELOG.md with sections like:
142-
- Breaking Changes (if any)
143-
- New Features
144-
- Bug Fixes
145-
- Documentation
146-
- Internal/Other changes
147-
148-
Include only the sections that are relevant based on the actual changes. Write clear, user-focused descriptions.
149-
150-
After updating CHANGELOG.md, commit the changes with the message "docs: update changelog for v${{ env.VERSION }}".
136+
prompt: /generate-changelog new version: ${{ env.VERSION }}, old version: ${{ steps.previous_tag.outputs.previous_tag }}
151137
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
152138
github_token: ${{ secrets.GITHUB_TOKEN }}
153139
claude_args: |

0 commit comments

Comments
 (0)