generator icon indicating copy to clipboard operation
generator copied to clipboard

[CI/CD] Release workflows do not trigger on scoped conventional commits (e.g. fix(generator):)

Open devxdh opened this issue 1 week ago • 0 comments

Describe the bug.

In .github/workflows/verify-changeset-release-alignment.yml and .github/workflows/release-with-changesets.yml, release qualification is checked with startsWith:

startsWith(title, 'fix:') || 
startsWith(title, 'fix!:') || 
startsWith(title, 'feat:') || 
startsWith(title, 'feat!:')

Because Conventional Commits v1.0.0 allows scopes (<type>(<scope>): <description>), scoped commits (for example: fix(generator):, fix(hooks):, feat(dart):) evaluate to false.

This creates two issues:

  1. On PRs: If a PR uses a scoped title (e.g. fix(hooks): ...) and includes a changeset, verify-changeset-release-alignment.yml (line 34) fails and requests an unscoped prefix. If the PR omits a changeset, line 40 evaluates to false and the check passes silently without prompting for one.
  2. On master: When a scoped PR is squash-merged to master, release-with-changesets.yml (line 19) skips running because of the same startsWith condition. Changesets merged with a scoped commit title remain unreleased on master until an unscoped commit merges later.

Expected behavior

  • Clarify whether the repository intended to support scoped Conventional Commits for triggering releases, or if unscoped titles are strictly enforced across the org.
  • If scoped commits are supported, both verify-changeset-release-alignment.yml and release-with-changesets.yml should recognize scoped prefixes like fix(scope): and feat(scope):.
  • If unscoped titles are strictly enforced by policy, the contributing docs and workflow checks should make this explicit so contributors know before opening PRs.

Screenshots

No response

How to Reproduce

  1. Test the expression in Node:
    node -e "console.log('fix(generator): fix bug'.startsWith('fix:'))"
    # Prints: false
    
  2. Real occurrence on master: Commit 3651e21 (fix(hooks): bundle emitted AsyncAPI document in generate:after hook (#2189)) added .changeset/bundle-emitted-asyncapi.md. Because the commit had a scope (fix(hooks):), release-with-changesets.yml skipped running. The changeset remained unreleased on master for 41 days until commit 93bd9ce (fix: ...) merged and triggered the release workflow.

Proposed Fix & Guidance Request

If maintainers would like to support scoped conventional commits, we can expand the startsWith expressions in both workflows without adding external dependencies:

  1. In .github/workflows/release-with-changesets.yml (line 19):
if: startsWith( github.repository, 'asyncapi/' ) &&
     (startsWith( github.event.commits[0].message, 'fix:' ) ||
      startsWith( github.event.commits[0].message, 'fix(' ) ||
      startsWith( github.event.commits[0].message, 'fix!:' ) ||
      startsWith( github.event.commits[0].message, 'feat:' ) ||
      startsWith( github.event.commits[0].message, 'feat(' ) ||
      startsWith( github.event.commits[0].message, 'feat!:' ) ||
      startsWith( github.event.commits[0].message, 'chore(release):' 
))
  1. In .github/workflows/verify-changeset-release-alignment.yml (line 24):
env:
  TITLE_TRIGGERS_RELEASE: ${{ startsWith(github.event.pull_request.title, 'fix:') ||
    startsWith(github.event.pull_request.title, 'fix(') || 
    startsWith(github.event.pull_request.title, 'fix!:') ||
    startsWith(github.event.pull_request.title, 'feat:') || 
    startsWith(github.event.pull_request.title, 'feat(') ||
    startsWith(github.event.pull_request.title, 'feat!:') 
}}

Alternatively, if unscoped titles are intentionally preferred across the org, we can update the alignment check message and contributing guide to state this clearly.

Would love maintainers' guidance on which direction is preferred!

🖥️ Device Information [optional]

  • Operating System: Fedora Linux Workstation 44

👀 Have you checked for similar open issues?

  • [x] I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

  • [x] I have read the Contributing Guidelines

Are you willing to work on this issue ?

Yes I am willing to submit a PR!

devxdh avatar Nov 25 '26 12:11 devxdh