ci: add communique to enhance release notes#411
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates the Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds the communique tool to the mise.toml configuration to support AI-enhanced release notes. My feedback focuses on improving the stability and reproducibility of the CI/CD environment by recommending pinning the new tool to a specific version instead of using latest.
| node = '24' | ||
| git-cliff = 'latest' | ||
| gh = 'latest' | ||
| communique = 'latest' |
There was a problem hiding this comment.
To ensure build reproducibility and prevent unexpected failures in the CI pipeline, it's a best practice to pin tool versions instead of using latest. A future release of communique with breaking changes could cause the release workflow to fail. Please pin this to a specific version (e.g., communique = '1.2.3').
References
- Dependencies in CI/CD environments should be pinned to specific versions to ensure build reproducibility and stability. Using floating versions like 'latest' can lead to unexpected build failures when a new version with breaking changes is released.
Greptile SummaryThis PR adds a post-release Key points:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant GH as GitHub Actions
participant Release as release job
participant Enhance as enhance-release job
participant GHRelease as GitHub Releases API
participant Anthropic as Anthropic API
GH->>Release: PR merged with 'release' label
Release->>GH: git tag + git push (v4.x.x, v4)
Release->>GHRelease: gh release create --generate-notes
GHRelease-->>Release: Release created with auto-notes
Release-->>GH: success
GH->>Enhance: needs: [release] satisfied
Enhance->>Enhance: TAG_NAME = v$(jq .version package.json)
Enhance->>Anthropic: communique generate TAG_NAME (ANTHROPIC_API_KEY)
Anthropic-->>Enhance: AI-enhanced release notes
Enhance->>GHRelease: --github-release (RELEASE_PLZ_GITHUB_TOKEN)
GHRelease-->>Enhance: Release notes updated
Reviews (1): Last reviewed commit: "ci: use RELEASE_PLZ_GITHUB_TOKEN for com..." | Re-trigger Greptile |
| enhance-release: | ||
| needs: [release] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2 | ||
| - name: Enhance release notes with communique | ||
| run: | | ||
| TAG_NAME="v$(jq -r .version package.json)" | ||
| communique generate "$TAG_NAME" --github-release | ||
| env: | ||
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_GITHUB_TOKEN }} No newline at end of file |
There was a problem hiding this comment.
Consider mirroring the parent job's
if condition
The release job only runs when a release-labelled PR is merged. While GitHub Actions correctly propagates the "skipped" status from release to enhance-release via needs, adding an explicit if guard makes the intent self-documenting and prevents the job from appearing as a skipped entry in the Actions UI for every non-release PR close event.
| enhance-release: | |
| needs: [release] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2 | |
| - name: Enhance release notes with communique | |
| run: | | |
| TAG_NAME="v$(jq -r .version package.json)" | |
| communique generate "$TAG_NAME" --github-release | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_GITHUB_TOKEN }} | |
| enhance-release: | |
| needs: [release] | |
| if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release') | |
| runs-on: ubuntu-latest |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| TAG_NAME="v$(jq -r .version package.json)" | ||
| communique generate "$TAG_NAME" --github-release |
There was a problem hiding this comment.
Tag derivation races with
package.json on the checked-out ref
jq -r .version package.json reads the version from the default checkout ref (the PR's merge commit), which is correct since the release job bumps package.json and pushes it before this job runs. However, if postversion.sh pushes additional commits after tagging, there is a window where HEAD on the branch may be ahead of the tag. Using the tag published by the release job directly (e.g. via the GitHub API or by reading it from the git log) would be more robust:
| TAG_NAME="v$(jq -r .version package.json)" | |
| communique generate "$TAG_NAME" --github-release | |
| TAG_NAME="v$(jq -r .version package.json)" | |
| git fetch --tags | |
| # Verify the computed tag actually exists before proceeding | |
| git rev-parse "$TAG_NAME" >/dev/null | |
| communique generate "$TAG_NAME" --github-release |
Summary
enhance-releasejob to release workflow that runs after release creation to generate AI-enhanced release notesTest plan
🤖 Generated with Claude Code
Note
Medium Risk
Adds a new post-release GitHub Actions job that uses an external AI API and an elevated token to modify GitHub release notes; failures or misconfigured secrets can break the release workflow and token scope matters.
Overview
After the
releasejob completes, the workflow now runs a newenhance-releasejob that computes the tag frompackage.jsonand callscommunique generate ... --github-releaseto update the GitHub release notes.The PR also adds
communiquetomise.tomlso the tool is available in CI, and wires inANTHROPIC_API_KEYplus a dedicatedRELEASE_PLZ_GITHUB_TOKENfor the release-note update step.Written by Cursor Bugbot for commit d2335f6. This will update automatically on new commits. Configure here.