Skip to content

Exclamation mark (!) after type/scope completely ignores commit #759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dimitrisfasoulas opened this issue Mar 19, 2025 · 0 comments
Open

Comments

@dimitrisfasoulas
Copy link

I'm using the following config:

module.exports = {
  branches: ['master', 'test_commit'],
  repositoryUrl:
    'ssh://git@*********',
  plugins: [
    [
      '@semantic-release/commit-analyzer',
      {
        preset: 'conventionalcommits'
      }
    ],
    '@semantic-release/release-notes-generator',
    '@semantic-release/changelog',
    '@semantic-release/npm',
    [
      '@semantic-release/git',
      {
        message:
          'chore(release): [XX-000] ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
      }
    ]
  ]
};

This seems to work normally when committing feat: or fix: to trigger minor or patch versions, but when the commit message includes ! after scope it is completely ignored. This is the results of the analysis running on my machine with -d (dryrun)

[12:17:21 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[12:17:21 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: feat!: add new feature
  semantic-release:commit-analyzer Analyzing with default rules +0ms
[12:17:21 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[12:17:21 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: feat: should trigger mnr
  semantic-release:commit-analyzer Analyzing with default rules +1ms
  semantic-release:commit-analyzer The rule { type: 'feat', release: 'minor' } match commit with release type 'minor' +0ms
[12:17:21 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is minor
[12:17:21 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: feat!: should trigger mjr
  semantic-release:commit-analyzer Analyzing with default rules +0ms
[12:17:21 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[12:17:21 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: feat!: [XX-1234] Commit test
  semantic-release:commit-analyzer Analyzing with default rules +1ms
[12:17:21 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[12:17:21 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 4 commits complete: minor release
[12:17:21 PM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[12:17:21 PM] [semantic-release] › ℹ  The next release version is 4.1.0

As you can see above all the commits with feat!: give: The commit should not trigger a release

I'm running with --debug and I see that my config is loaded normally:

 semantic-release:plugins options for @semantic-release/commit-analyzer/analyzeCommits: { preset: 'conventionalcommits' } +0ms
[12:17:12 PM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"

Adding BREAKING CHANGES: <desc> footer is respected normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant