ci: add changeset release alignment check - #2204
Conversation
Prevents merged PRs from pairing a changeset with a scoped title that skips Release (e.g. fix(hooks):). Fixes asyncapi#2203
|
What reviewer looks at during PR reviewThe following are ideal points maintainers look for during review. Reviewing these points yourself beforehand can help streamline the review process and reduce time to merge.
|
📝 WalkthroughWalkthroughThe PR adds a pull request workflow that checks alignment between ChangesChangeset release alignment
Estimated code review effort: 3 (Moderate) | ~15 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/verify-changeset-release-alignment.yml:
- Around line 39-43: Update the “Release title but no changeset in PR” workflow
condition to also require changed publishable package source and to pass when
either the PR contains a changeset or the repository already has a pending
changeset. Reuse the workflow’s existing filter outputs or checks for
publishable source and pending changesets, and retain the current error step
only when all required failure conditions are met.
- Around line 8-10: Update the workflow-level permissions alongside contents:
read to grant pull-requests: read, allowing dorny/paths-filter to inspect
changed files during pull_request runs before alignment checks execute.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: efbd155a-1323-4993-afc4-b212d9d22953
📒 Files selected for processing (2)
.github/workflows/verify-changeset-release-alignment.ymlDevelopment.md
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.github/workflows/verify-changeset-release-alignment.yml (1)
36-39:⚠️ Potential issue | 🟠 MajorKeep pending changesets and publishable-source exceptions in this check.
This condition still rejects release-style PRs when the current PR has no changeset. It also rejects documentation-only wake-up PRs and PRs that rely on pending changesets already in the repository. Fail only when publishable package source changes exist and neither the PR nor the repository has a pending changeset.
This finding remains unresolved from the previous review. Based on the PR objectives, documentation-only wake-up PRs and pending changesets must be allowed.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/verify-changeset-release-alignment.yml around lines 36 - 39, Update the release-title/no-changeset check around “Release title but no changeset in PR” so it fails only when publishable package source changes exist, no changeset is present in the PR, and the repository has no pending changesets. Preserve exceptions for documentation-only wake-up PRs and existing pending changesets, reusing the workflow’s established source-change and pending-changeset outputs or symbols.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.changeset/test-release-alignment-ci.md:
- Around line 1-5: Delete the temporary changeset file
test-release-alignment-ci.md after CI verification so it cannot trigger an
unintended `@asyncapi/generator` patch release.
---
Duplicate comments:
In @.github/workflows/verify-changeset-release-alignment.yml:
- Around line 36-39: Update the release-title/no-changeset check around “Release
title but no changeset in PR” so it fails only when publishable package source
changes exist, no changeset is present in the PR, and the repository has no
pending changesets. Preserve exceptions for documentation-only wake-up PRs and
existing pending changesets, reusing the workflow’s established source-change
and pending-changeset outputs or symbols.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 0da4fef8-b795-4819-b342-634391f24f93
📒 Files selected for processing (2)
.changeset/test-release-alignment-ci.md.github/workflows/verify-changeset-release-alignment.yml
|
|
@Adi-204 shouldn't we fix it with some simple regex? |
|
@derberg can you provide some more details? do you mean we should change https://github.com/asyncapi/generator/blob/master/.github/workflows/release-with-changesets.yml#L16 to only check for fix/feat so that something like fix():/feat(): are also accepted. I don't get exactly what about regex.
|



DON'T MERGE it directly we first need to discuss what about #2189 NOT released because of title and how we plan it.
Description
.changeset/*.mdchange without an unscoped release title (fix:/feat:/ …), or the opposite.dorny/paths-filterfor changeset detection and jobenvfor title prefixes (aligned with Release workflow for human PRs).asyncapi-bot, Dependabot).Development.md.Related issue(s)
Fixes #2203
AI assistance
Generated-by:CursorSummary by CodeRabbit