feat: integrate release-plz with git-cliff for automated changelog generation#4
feat: integrate release-plz with git-cliff for automated changelog generation#4
Conversation
…neration Add release-plz configuration with conventional commits parsing for changelog generation. The workflow creates version bump + changelog PRs on main, and publishes git tags on merge (delegating GitHub Release creation to cargo-dist). 🤖 Generated with AI
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
WalkthroughAIエージェント向けの新しいドキュメンテーションファイル(AGENTS.md)を追加しました。このファイルにはPRワークフロー、スクワッシュマージポリシー、PR タイトル形式、および受け入れ可能な変更タイプ(feat、fix、docs、refactor、test、chore)の定義が含まれています。 Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
GITHUB_TOKEN cannot trigger other workflows (GitHub loop prevention). A PAT (RELEASE_PLZ_TOKEN) is required so that the tag push triggers cargo-dist release.yml. 🤖 Generated with AI
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9b1fe69ae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@AGENTS.md`:
- Around line 11-13: The fenced code blocks in AGENTS.md are missing language
specifiers (MD040); update each triple-backtick block shown (the one around the
"<type>: <description>" example and the commit-list block later) to include a
language label such as "text" (i.e., change ``` to ```text) so markdownlint no
longer flags MD040 and the blocks render/read more clearly; ensure both the
block at the example (around "<type>: <description>") and the block containing
the commit lines ("feat: add wtl short alias..." through "chore: add dist
profile...") are updated.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
.github/workflows/release-plz.ymlis excluded by!**/*.ymlrelease-plz.tomlis excluded by!**/*.toml
📒 Files selected for processing (2)
AGENTS.mdCLAUDE.md
| ``` | ||
| <type>: <description> | ||
| ``` |
There was a problem hiding this comment.
フェンスコードに言語指定を追加してください(MD040)
markdownlint の警告対象です。言語指定を付けると読みやすさも上がります。
💡 修正案(language 指定の追加)
-```
+```text
<type>: <description>
-```
+```
-```
+```text
feat: add wtl short alias via bin-aliases
fix: canonicalize symlink targets before prefix matching
docs: update Homebrew installation instructions
chore: add dist profile with thin LTO
-```
+```Also applies to: 26-31
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)
[warning] 11-11: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@AGENTS.md` around lines 11 - 13, The fenced code blocks in AGENTS.md are
missing language specifiers (MD040); update each triple-backtick block shown
(the one around the "<type>: <description>" example and the commit-list block
later) to include a language label such as "text" (i.e., change ``` to ```text)
so markdownlint no longer flags MD040 and the blocks render/read more clearly;
ensure both the block at the example (around "<type>: <description>") and the
block containing the commit lines ("feat: add wtl short alias..." through
"chore: add dist profile...") are updated.
There was a problem hiding this comment.
Pull request overview
This PR introduces automated release management through release-plz, which handles version bumping and changelog generation based on conventional commits. The workflow integrates with the existing cargo-dist setup to create a complete CI/CD pipeline where release-plz manages versioning and tagging, while cargo-dist handles binary distribution.
Changes:
- Added release-plz configuration disabling GitHub releases and crates.io publishing (delegated to cargo-dist)
- Created GitHub Actions workflow with two jobs: one to create/update release PRs with version bumps and changelogs, another to create git tags when merged
- Added PR guidelines documentation specifying conventional commit format for AI agents and contributors
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| release-plz.toml | Configures release-plz to skip GitHub releases and crates.io publishing, letting cargo-dist handle distribution |
| .github/workflows/release-plz.yml | Defines two-job workflow: create/update release PRs on main pushes, and create tags when version changes are merged |
| AGENTS.md | Documents PR title conventions using conventional commits for changelog generation |
| CLAUDE.md | Intended to be a symlink to AGENTS.md for Claude AI agent accessibility |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| release-plz-release: | ||
| name: Release-plz release | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| - name: Run release-plz | ||
| uses: release-plz/action@v0.5 | ||
| with: | ||
| command: release | ||
| env: | ||
| # PAT is required so that the created tag triggers cargo-dist's release.yml. |
There was a problem hiding this comment.
The workflow has both jobs running on every push to main, which could cause race conditions. The 'release-plz-release' job will attempt to create git tags whenever version changes are detected in Cargo.toml, but it will also run when the release PR is merged (which updates Cargo.toml). Meanwhile, 'release-plz-pr' might try to update the release PR. Consider adding conditions to ensure 'release-plz-release' only runs when it's not a release-plz bot commit, or restructure so these jobs don't interfere. For example, 'release-plz-release' could skip if the commit message starts with 'chore(release)' or similar pattern that release-plz uses.
| contents: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 |
There was a problem hiding this comment.
There is an inconsistency in the checkout action versions across workflows. The release-plz workflow uses 'actions/checkout@v6' while the existing CI workflow uses 'actions/checkout@v4'. This inconsistency could lead to confusion and makes maintenance harder. Consider using the same version across all workflows for consistency, preferably v6 if it's the latest stable version being adopted.
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false |
There was a problem hiding this comment.
The workflow sets 'persist-credentials: false' in the checkout step but then uses the GITHUB_TOKEN in the release-plz action. The 'persist-credentials: false' setting prevents the checkout action from persisting credentials for subsequent git operations, which could interfere with release-plz's ability to create commits, tags, or push changes. Since release-plz needs to perform git operations, consider removing 'persist-credentials: false' or ensure release-plz is configured to use the GITHUB_TOKEN for all git operations. Verify that release-plz action handles this correctly.
AGENTS.md
Outdated
| Types: | ||
|
|
||
| - `feat` — New feature | ||
| - `fix` — Bug fix | ||
| - `docs` — Documentation only | ||
| - `refactor` — Code restructuring without behavior change | ||
| - `test` — Adding or updating tests | ||
| - `chore` — Maintenance, tooling, CI, dependencies |
There was a problem hiding this comment.
The conventional commit types listed are missing some standard types that are commonly used and might be relevant for this project. Consider adding:
- 'perf' for performance improvements
- 'style' for code style changes (formatting, missing semicolons, etc.)
- 'ci' for CI/CD changes (could replace or supplement 'chore' for workflow-specific changes)
- 'build' for build system changes
This would provide more granular control over changelog generation and better semantic meaning for different types of changes.
| name: Release-plz | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| release-plz-release: | ||
| name: Release-plz release | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| - name: Run release-plz | ||
| uses: release-plz/action@v0.5 | ||
| with: | ||
| command: release | ||
| env: | ||
| # PAT is required so that the created tag triggers cargo-dist's release.yml. | ||
| # GITHUB_TOKEN cannot trigger other workflows (GitHub's loop prevention). | ||
| GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }} | ||
|
|
||
| release-plz-pr: | ||
| name: Release-plz PR | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| concurrency: | ||
| group: release-plz-${{ github.ref }} | ||
| cancel-in-progress: false | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| - name: Run release-plz | ||
| uses: release-plz/action@v0.5 | ||
| with: | ||
| command: release-pr |
There was a problem hiding this comment.
The PR description mentions a test plan with checkboxes, but all items are unchecked. Before merging this PR, consider:
- Testing the workflow on a non-main branch first
- Verifying that release-plz correctly parses conventional commits
- Confirming the interaction between release-plz tag creation and cargo-dist release triggering
- Ensuring the draft PR creation works as expected
Consider running these tests or documenting why they're not needed before merge.
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| - name: Run release-plz | ||
| uses: release-plz/action@v0.5 |
There was a problem hiding this comment.
The release-plz action is pinned to a minor version (@v0.5) rather than a specific SHA or patch version. While this allows automatic updates to patch versions, it could introduce unexpected changes. For better reproducibility and security, consider either:
- Pinning to a specific patch version and SHA (e.g., release-plz/action@v0.5.X with SHA)
- Using Dependabot or Renovate to automatically update pinned versions
This is especially important for release workflows where unexpected behavior could disrupt the release process.
🤖 Generated with AI
🤖 Generated with AI
🤖 Generated with AI
🤖 Generated with AI
Summary
Configuration
release-plz.toml: 最小構成(git_release_enable=false、cargo-distがGitHub Releaseを担当).github/workflows/release-plz.yml: 2つのジョブrelease-plz-pr: バージョンバンプ + CHANGELOG更新のPRを自動作成release-plz-release: マージ後にgitタグを作成(PATでcargo-distをトリガー)AGENTS.md: PRタイトルのConventional Commits形式ガイドラインCLAUDE.md: AGENTS.mdへのシンボリックリンクRelease workflow
Required secrets
GH_TOKENTest plan
🤖 Generated with AI