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

release-notes-generator: group notes by multiple titles #1083

Open
danijelTxFusion opened this issue Aug 17, 2023 · 0 comments
Open

release-notes-generator: group notes by multiple titles #1083

danijelTxFusion opened this issue Aug 17, 2023 · 0 comments

Comments

@danijelTxFusion
Copy link

I want to include "DEPRECATED" notes in my commits, in addition to "BREAKING CHANGE." I also do not want a major release to be triggered when the term "DEPRECATED" is present. Furthermore, I aim to categorize the notes in the changelog and release notes under the titles "DEPRECATED" and "BREAKING CHANGE." Here's an example of what I am trying to achieve:

feat: add `Client.CallContractL2` method 

DEPRECATED:  `Client.CallContract` has been deprecated in favor of `Client.CallContractL2`.
feat: change return type of the `SendTransaction` function 

BREAKING CHANGE:  Return type of the `SendTransaction` function has been changed from `[]byte` to `Transaction`.

I want the following changelog and release notes to be generated:

3.1.0 (2023-08-17)

Features

 - add `Client.CallContractL2` method  (<hash>)
 - change return type of the `SendTransaction` function  (<hash>)

BREAKING CHANGES

-  Return type of the `SendTransaction` function has been changed from `[]byte` to `Transaction`.

DEPRECATED

-  `Client.CallContract` has been deprecated in favor of `Client.CallContractL2`.

I read the documentation but I am still having trouble to achieve this. I tried to use the nodeGroupSort but it did not fix the problem because all notes are placed under BREAKABLE CHANGE section.

Here's the .releaserc that I am trying to make it work:

{
  "branches": "main",
  "debug": true,
  "addReleases": "top",
  "npmPublish": false,
  "plugins": [
    "@semantic-release/commit-analyzer",
    [
      "@semantic-release/release-notes-generator",
      {
        "parserOpts": {
          "noteKeywords": ["BREAKING CHANGE", "DEPRECATED"]
        },
        "writerOpts": {
           "noteGroupsSort": ["BREAKING CHANGE", "DEPRECATED"]
        }
      }
    ],
    [
      "@semantic-release/changelog",
      {
        "changelogFile": "CHANGELOG.md"
      }
    ],
    [
      "@semantic-release/git",
      {
        "assets": ["CHANGELOG.md"],
        "message": "${nextRelease.version} CHANGELOG [skip ci]\n\n${nextRelease.notes}"
      }
    ],
    "@semantic-release/github"
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant