Skip to content
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

Commit with feat!: did not trigger release #439

Closed
derberg opened this issue Apr 26, 2023 · 3 comments
Closed

Commit with feat!: did not trigger release #439

derberg opened this issue Apr 26, 2023 · 3 comments

Comments

@derberg
Copy link

derberg commented Apr 26, 2023

We had a strange situation today in our project.

We merged asyncapi/spec-json-schemas#298 and few others, but only this one had feat!: commit asyncapi/spec-json-schemas@d950c38

Release workflow released 4.3 instead of 5.0 -> https://github.com/asyncapi/spec-json-schemas/actions/runs/4810078890/jobs/8562270367

logs say:

[2:49:22 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: feat!: extend bundling to create another schemas without $id (#298)


Co-authored-by: Sergio Moya <[email protected]>
[2:49:22 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release

but instead of The commit should not trigger a release we expected The release type for the commit is major

any help appreciated to understand what we did wrong

@derberg
Copy link
Author

derberg commented Apr 26, 2023

your tests case shows all should be good

test('Return "major" if there is a "conventionalcommits" breaking change, using default releaseRules', async (t) => {
  const commits = [
    {hash: '123', message: 'fix: First fix'},
    {hash: '456', message: 'feat!: Breaking change feature'},
  ];
  const releaseType = await analyzeCommits({preset: 'conventionalcommits'}, {cwd, commits, logger: t.context.logger});

  t.is(releaseType, 'major');
  t.true(t.context.log.calledWith('Analyzing commit: %s', commits[0].message));
  t.true(t.context.log.calledWith('The release type for the commit is %s', 'patch'));
  t.true(t.context.log.calledWith('Analyzing commit: %s', commits[1].message));
  t.true(t.context.log.calledWith('The release type for the commit is %s', 'major'));
  t.true(t.context.log.calledWith('Analysis of %s commits complete: %s release', 2, 'major'));
});

our config https://github.com/asyncapi/spec-json-schemas/blob/master/.github/workflows/.releaserc do not have any special rules.


it failed again: https://github.com/asyncapi/spec-json-schemas/actions/runs/4810798555/jobs/8563967377

[4:00:29 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: feat!: release version 5.0.0
[4:00:29 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release

@derberg
Copy link
Author

derberg commented Apr 26, 2023

I think our config file is ignored and default angular convention is used that do not respect conventional commits fully and feat! is not a breaking change for them. Further investigating

@derberg
Copy link
Author

derberg commented Apr 27, 2023

closing, I was right, problem was with releaserc location

@derberg derberg closed this as completed Apr 27, 2023
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