Skip to content

ci: add changeset release alignment check - #2204

Open
Adi-204 wants to merge 5 commits into
asyncapi:masterfrom
Adi-204:ci/changeset-release-pr-guard
Open

ci: add changeset release alignment check#2204
Adi-204 wants to merge 5 commits into
asyncapi:masterfrom
Adi-204:ci/changeset-release-pr-guard

Conversation

@Adi-204

@Adi-204 Adi-204 commented Aug 9, 2026

Copy link
Copy Markdown
Member

DON'T MERGE it directly we first need to discuss what about #2189 NOT released because of title and how we plan it.

Description

  • Adds Verify changeset release alignment workflow (v1): fails when a PR has a .changeset/*.md change without an unscoped release title (fix: / feat: / …), or the opposite.
  • Uses dorny/paths-filter for changeset detection and job env for title prefixes (aligned with Release workflow for human PRs).
  • Skips draft PRs and known bots (asyncapi-bot, Dependabot).
  • Documents the rule in Development.md.

Related issue(s)

Fixes #2203

AI assistance

  • This PR was created with AI assistance — Generated-by: Cursor
  • No AI assistance was used

Summary by CodeRabbit

  • Chores
    • Added automated checks to ensure release-related pull requests include the appropriate release notes.
    • Added validation to flag mismatches between release labeling and documented changes.
  • Tests
    • Added a temporary release note entry to verify the new validation workflow.

Prevents merged PRs from pairing a changeset with a scoped title that skips Release (e.g. fix(hooks):).

Fixes asyncapi#2203
@changeset-bot

changeset-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c688183

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@asyncapi-bot

Copy link
Copy Markdown
Contributor

What reviewer looks at during PR review

The 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.

  1. PR Title: Use a concise title that follows our Conventional Commits guidelines and clearly summarizes the change using imperative mood (it means spoken or written as if giving a command or instruction, like "add new helper for listing operations")

    Note - In Generator, prepend feat: or fix: in PR title only when PATCH/MINOR release must be triggered.

  2. PR Description: Clearly explain the issue being solved, summarize the changes made, and mention the related issue.

    Note - In Generator, we use Maintainers Work board to track progress. Ensure the PR Description includes Resolves #<issue-number> or Fixes #<issue-number> this will automatically close the linked issue when the PR is merged and helps automate the maintainers workflow.

  3. Documentation: Update the relevant Generator documentation to accurately reflect the changes introduced in the PR, ensuring users and contributors have up-to-date guidance.

  4. Comments and JSDoc: Write clear and consistent JSDoc comments for functions, including parameter types, return values, and error conditions, so others can easily understand and use the code.

  5. DRY Code: Ensure the code follows the Don't Repeat Yourself principle. Look out for duplicate logic that can be reused.

  6. Test Coverage: Ensure the new code is well-tested with meaningful test cases that pass consistently and cover all relevant edge cases.

  7. Commit History: Contributors should avoid force-pushing as much as possible. It makes it harder to track incremental changes and review the latest updates.

  8. Template Design Principles Alignment: While reviewing template-related changes in the packages/ directory, ensure they align with the Assumptions and Principles. If any principle feels outdated or no longer applicable, start a discussion these principles are meant to evolve with the project.

  9. Reduce Scope When Needed: If an issue or PR feels too large or complex, consider splitting it and creating follow-up issues. Smaller, focused PRs are easier to review and merge.

  10. Bot Comments: As reviewers, check that contributors have appropriately addressed comments or suggestions made by automated bots. If there are bot comments the reviewer disagrees with, react to them or mark them as resolved, so the review history remains clear and accurate.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds a pull request workflow that checks alignment between .changeset/*.md files and release-style titles. It also adds a temporary patch changeset for @asyncapi/generator.

Changes

Changeset release alignment

Layer / File(s) Summary
Pull request alignment detection
.github/workflows/verify-changeset-release-alignment.yml
The workflow runs on selected pull request events, excludes drafts and specified bots, detects changeset files, and identifies fix: and feat: title variants.
Mismatch enforcement and CI fixture
.github/workflows/verify-changeset-release-alignment.yml, .changeset/test-release-alignment-ci.md
The workflow fails when only one of a changeset or release-style title is present. The changeset marks @asyncapi/generator for a patch release.

Estimated code review effort: 3 (Moderate) | ~15 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The workflow covers changeset and title alignment, but it does not show Rule B for publishable code and pending changesets or the required documentation updates. Implement Rule B, add the required documentation, and verify the acceptance scenarios, including publishable source changes and pending changesets.
Out of Scope Changes check ⚠️ Warning The temporary patch changeset for testing CI is unrelated to the durable guard implementation and may trigger an unintended package release. Remove the temporary test changeset, or isolate it in a test-only mechanism that cannot affect the package release process.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses a Conventional Commits prefix, uses imperative mood, and clearly summarizes the release-alignment workflow change.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@Adi-204 Adi-204 changed the title ci: add changeset release alignment check fix: add changeset release alignment check Aug 9, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3651e21 and 3a1e5a4.

📒 Files selected for processing (2)
  • .github/workflows/verify-changeset-release-alignment.yml
  • Development.md

Comment thread .github/workflows/verify-changeset-release-alignment.yml Outdated
Comment thread .github/workflows/verify-changeset-release-alignment.yml
@Adi-204 Adi-204 changed the title fix: add changeset release alignment check fix(hooks): add changeset release alignment check Aug 9, 2026
@Adi-204 Adi-204 changed the title fix(hooks): add changeset release alignment check ci: add changeset release alignment check Aug 9, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/workflows/verify-changeset-release-alignment.yml (1)

36-39: ⚠️ Potential issue | 🟠 Major

Keep 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

📥 Commits

Reviewing files that changed from the base of the PR and between 504772f and 60f4303.

📒 Files selected for processing (2)
  • .changeset/test-release-alignment-ci.md
  • .github/workflows/verify-changeset-release-alignment.yml

Comment thread .changeset/test-release-alignment-ci.md Outdated
@sonarqubecloud

sonarqubecloud Bot commented Aug 9, 2026

Copy link
Copy Markdown

@Adi-204 Adi-204 moved this to In Progress in Maintainers work Aug 12, 2026
@derberg

derberg commented Aug 18, 2026

Copy link
Copy Markdown
Member

@Adi-204 shouldn't we fix it with some simple regex?

@Adi-204

Adi-204 commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

@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.
Two questions -

  1. Do you think we need this new CI workflow or not useful?
  2. What about old freeze https://github.com/asyncapi/generator/blob/master/.changeset/bundle-emitted-asyncapi.md how we plan to release it? If we do fix: in this PR title we will need to add changeset as otherwise CI will fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

CI Guard PR titles against changesets so Release workflow is not skipped

3 participants