Code Monkey home page Code Monkey logo

Comments (2)

RaphaelNeumann avatar RaphaelNeumann commented on July 22, 2024 6

I had the same issue like you.

But I found a solution by adding {breaking: true, release: 'major'} on my releaseRules

{
  preset: 'conventionalcommits',
  releaseRules: [
    { breaking: true, release: 'major' },
    { type: 'feat', release: 'minor' },
    { type: 'feature', release: 'minor' },
    { type: 'fix', release: 'patch' },
    { type: 'style', release: 'patch' },
    { type: 'refactor', release: 'patch' },
    { type: 'perf', release: 'patch' },
    { type: 'build', release: 'patch' },
    { type: 'chore', release: 'patch' },
    { type: 'revert', release: 'patch' }
  ]
}

from commit-analyzer.

tomavic avatar tomavic commented on July 22, 2024

I also had the same issue when I tried to commit a perf commit with BREAKING CHANGE: in the body, I was expecting a major release but instead it triggers the patch.

      "@semantic-release/commit-analyzer",
      {
        "preset": "conventionalcommits",
        "parserOpts": {
          "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
        },
        "releaseRules": [
          { "type": "docs", "release": "patch" },
          { "type": "refactor", "release": "patch" },
          { "type": "style", "release": "patch" },
          { "type": "test", "release": "patch" },
          { "type": "ci", "release": "patch" },
          { "type": "chore", "release": "patch" },
          { "type": "perf", "release": "patch" }
        ]
      }

Is there is any way to add multiple types with multiple release?
Or something to override the rules if it found the BREAKING CHANGE: word in the body of the commit message?

I had the same issue like you.

But I found a solution by adding {breaking: true, release: 'major'} on my releaseRules

{
  preset: 'conventionalcommits',
  releaseRules: [
    { breaking: true, release: 'major' },
    { type: 'feat', release: 'minor' },
    { type: 'feature', release: 'minor' },
    { type: 'fix', release: 'patch' },
    { type: 'style', release: 'patch' },
    { type: 'refactor', release: 'patch' },
    { type: 'perf', release: 'patch' },
    { type: 'build', release: 'patch' },
    { type: 'chore', release: 'patch' },
    { type: 'revert', release: 'patch' }
  ]
}

from commit-analyzer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.