Skip to content

feat: add release automation command /release with version bump and CHANGELOG update logic#1204

Open
ttypic wants to merge 1 commit intomainfrom
release-skill
Open

feat: add release automation command /release with version bump and CHANGELOG update logic#1204
ttypic wants to merge 1 commit intomainfrom
release-skill

Conversation

@ttypic
Copy link
Contributor

@ttypic ttypic commented Mar 25, 2026

Release automation command /release with version bump and CHANGELOG update logic

@ttypic ttypic requested a review from sacOO7 March 25, 2026 16:30
@coderabbitai
Copy link

coderabbitai bot commented Mar 25, 2026

Warning

Rate limit exceeded

@ttypic has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 4 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7072a7ac-07d9-4dfa-9e61-375a13b86462

📥 Commits

Reviewing files that changed from the base of the PR and between edd76ab and 84d2bbd.

📒 Files selected for processing (2)
  • .claude/commands/release.md
  • CONTRIBUTING.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release-skill

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.


5. Commit `CHANGELOG.md` with message: `docs: update CHANGELOG for NEW_VERSION release`

After completing all steps, show the user a summary of what was done. If PRs were found, list them. If the placeholder `-` was used instead, remind them to fill in the `### What's Changed` bullet points in `CHANGELOG.md` before merging.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add one more step, to validate changes made in accordance with original requirement and fix them if anything missing found

7. Create the release and the release tag on Github including populating the release notes
8. Use the [GitHub action](https://github.com/ably/ably-java/actions/workflows/release.yaml) to publish the release. Run the workflow on the latest release tag.
9. Create the entry on the [Ably Changelog](https://changelog.ably.com/) (via [headwayapp](https://headwayapp.co/))
1. Run `/release patch|minor|major` in Claude Code — this creates the release branch, bumps the version in all required files, and populates the [CHANGELOG](./CHANGELOG.md) with merged PRs since the last tag automatically
Copy link
Collaborator

@sacOO7 sacOO7 Mar 26, 2026

Choose a reason for hiding this comment

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

I wouldn't recommend having claude dependent release process, since it frequently goes down and can delay the release. Maybe you should create a separate section

### Release using LLM

Add relevant steps there. maybe, sometime in near future, if claude gets replaced by other LLM, the release docs will still be relevant ( both manual and automated )

Then perform these steps in order:

1. Run `git checkout -b release/NEW_VERSION`
2. Replace `OLD_VERSION` with `NEW_VERSION` in all of the following files:
Copy link
Collaborator

@sacOO7 sacOO7 Mar 26, 2026

Choose a reason for hiding this comment

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

maybe apply regex here to change all versions in all files excluding CHANGELOG.md.
So, we don't need to manually specify each file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I afraid if we ask him to use regexp we can accidentally bump libraries that we shouldn't simply because they have the same version as ably-java. I want to be extremely caution here

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe add some exceptions, then regex should work fine wdyt

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds documentation and a Claude Code command definition to automate the release workflow (create release branch, bump version references, and prepend a new CHANGELOG entry from merged PRs).

Changes:

  • Replaces the manual release steps in CONTRIBUTING.md with a /release patch|minor|major workflow.
  • Adds a new Claude Code command spec at .claude/commands/release.md describing the automated steps (version bump + CHANGELOG update).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
CONTRIBUTING.md Updates the documented release process to use /release automation.
.claude/commands/release.md Defines the /release command procedure for version bumping and CHANGELOG population.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

2. Review the `### What's Changed` entries in [CHANGELOG.md](./CHANGELOG.md) and adjust if needed, then commit any edits
3. Make a PR against `main`
4. Once the PR is approved, merge it into `main`
5. Create the release and the release tag on Github including populating the release notes
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

Line uses "Github"; repository/docs elsewhere use the correct capitalization "GitHub". Please update for consistency (e.g., "Create the release and the release tag on GitHub …").

Suggested change
5. Create the release and the release tag on Github including populating the release notes
5. Create the release and the release tag on GitHub including populating the release notes

Copilot uses AI. Check for mistakes.
- `README.md` — 3 places: Maven `<version>`, Gradle `implementation '…'`, and LiveObjects `runtimeOnly("…")`
- `CONTRIBUTING.md` — the `implementation files('libs/ably-android-OLD_VERSION.aar')` line
- `lib/src/test/java/io/ably/lib/test/realtime/RealtimeHttpHeaderTest.java` — the hardcoded `"ably-java/OLD_VERSION"` string in the agent header assertion
Commit all five files together with message: `chore: bump version to NEW_VERSION`
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

The step lists 4 files to update (gradle.properties, README.md, CONTRIBUTING.md, RealtimeHttpHeaderTest.java) but then says "Commit all five files together". Please reconcile the count (either list the missing file or change to four).

Suggested change
Commit all five files together with message: `chore: bump version to NEW_VERSION`
Commit all four files together with message: `chore: bump version to NEW_VERSION`

Copilot uses AI. Check for mistakes.
Comment on lines +24 to +35
3. Fetch merged PRs since the last release tag using:
```
gh pr list --state merged --base main --json number,title,mergedAt --limit 200
```
Then get the date of the last release tag with:
```
git log vOLD_VERSION --format="%aI" -1
```
Filter the PRs to only those merged after that tag date. Format each as:
```
- Short, one sentence summary from PR title and description [#NUMBER](https://github.com/ably/ably-java/pull/NUMBER)
```
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

Step 3 says to write a summary from the PR title and description, but the suggested gh pr list command only fetches number,title,mergedAt so the description/body isn't available. Either include body in the JSON fields (and/or switch to gh pr view per PR) or update the instruction to use only the title.

Copilot uses AI. Check for mistakes.
Comment on lines +28 to +36
Then get the date of the last release tag with:
```
git log vOLD_VERSION --format="%aI" -1
```
Filter the PRs to only those merged after that tag date. Format each as:
```
- Short, one sentence summary from PR title and description [#NUMBER](https://github.com/ably/ably-java/pull/NUMBER)
```
If the tag doesn't exist or there are no merged PRs, use a single `-` placeholder bullet instead.
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

The instructions mention handling the case where tag vOLD_VERSION doesn't exist, but step 3 unconditionally runs git log vOLD_VERSION ..., which will error in that scenario. Add an explicit check/fallback (e.g., detect missing tag and skip date filtering / use the latest tag) so the command remains usable.

Suggested change
Then get the date of the last release tag with:
```
git log vOLD_VERSION --format="%aI" -1
```
Filter the PRs to only those merged after that tag date. Format each as:
```
- Short, one sentence summary from PR title and description [#NUMBER](https://github.com/ably/ably-java/pull/NUMBER)
```
If the tag doesn't exist or there are no merged PRs, use a single `-` placeholder bullet instead.
Then get the date of the last release tag, only if the tag exists:
```bash
if git rev-parse -q --verify "vOLD_VERSION^{tag}" >/dev/null; then
git log vOLD_VERSION --format="%aI" -1
else
# Tag doesn't exist; skip date filtering and consider all fetched PRs as candidates.
echo ""
fi

If a tag date is available, filter the PRs to only those merged after that tag date. If no tag date is available (because the tag doesn't exist), either:

  • treat all fetched PRs as candidates, or
  • if there are no relevant PRs to include, fall back to the placeholder below.
    Format each included PR as:
- Short, one sentence summary from PR title and description [#NUMBER](https://github.com/ably/ably-java/pull/NUMBER)

If, after applying this logic, there are no PRs to list, use a single - placeholder bullet instead.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants