ai-changelog-action
v1.0.0
Published
GitHub Action that generates AI-powered changelogs from merged PRs when a release is created
Maintainers
Readme
ai-changelog
GitHub Action that generates changelogs from your merged pull requests using AI. Runs when a release is published, reads all PRs since the last release, and produces a structured changelog.
on:
release:
types: [published]
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ofershap/ai-changelog@v1
with:
api-key: ${{ secrets.OPENAI_API_KEY }}
provider: openai
model: gpt-4o-mini
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Supports OpenAI and Anthropic. Transforms raw PR titles and metadata into readable release notes. No SDK dependencies, just native fetch.

Demo built with remotion-readme-kit
Why
Writing changelogs is one of those tasks that everyone agrees is important but nobody wants to do. GitHub has built-in auto-generated release notes, but they're just a list of PR titles, which is barely better than git log. This action reads your merged PRs, sends them to an AI model, and gets back a properly categorized changelog with human-readable descriptions. It groups changes into Features, Bug Fixes, Breaking Changes, and whatever other categories you define. You can have it update the GitHub Release body automatically, so publishing a release is all it takes to get a proper changelog.
Usage
Add the action to a workflow that runs on release: published:
name: Generate Changelog
on:
release:
types: [published]
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ofershap/ai-changelog@v1
with:
api-key: ${{ secrets.OPENAI_API_KEY }}
provider: openai
model: gpt-4o-mini
categories: "Features,Bug Fixes,Breaking Changes,Other"
update-release: "true"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Inputs
| Input | Required | Default | Description |
| ---------------- | -------- | ------------------------------------------- | ------------------------------------------------- |
| provider | No | openai | AI provider: openai or anthropic |
| model | No | gpt-4o-mini | Model to use (e.g. gpt-4o, claude-3-haiku) |
| api-key | Yes | | API key for the AI provider |
| categories | No | Features,Bug Fixes,Breaking Changes,Other | Comma-separated changelog categories |
| update-release | No | true | Update the GitHub Release body with the changelog |
Outputs
| Output | Description |
| ----------- | ---------------------------- |
| changelog | The generated changelog text |
How It Works
- Runs when a new GitHub Release is published.
- Uses the GitHub API to list merged PRs since the previous release.
- Builds a text summary of PR numbers, titles, authors, and labels.
- Sends the summary to OpenAI or Anthropic with a changelog system prompt.
- Optionally writes the generated changelog to the release body.
Supported Providers
| Provider | Models (examples) | API Key Secret |
| ------------- | ------------------------------------ | ------------------- |
| OpenAI | gpt-4o-mini, gpt-4o, gpt-4 | OPENAI_API_KEY |
| Anthropic | claude-3-haiku, claude-3-sonnet | ANTHROPIC_API_KEY |
Example Output
## Features
- Added dark mode support for the dashboard (#42)
- New `--dry-run` flag for migrations (#38)
## Bug Fixes
- Fixed memory leak in WebSocket handler (#41)
- Resolved timezone handling for scheduled tasks (#39)
## Other
- Updated dependencies (#40)AI DevOps Suite
Part of the AI DevOps suite:
- ai-commit-msg: AI-generated conventional commit messages
- ai-pr-reviewer: AI-powered PR review comments
- ai-label-pr: Auto-label PRs by size and type
- ai-changelog: AI-generated changelogs from merged PRs (this project)
Development
npm install
npm run typecheck
npm run build
npm test
npm run lintAuthor
Ofer Shapira
