Giter Site home page Giter Site logo

semantic-release / release-notes-generator Goto Github PK

View Code? Open in Web Editor NEW
286.0 6.0 43.0 3.58 MB

:clipboard: semantic-release plugin to generate changelog content with conventional-changelog

License: MIT License

JavaScript 100.00%
semantic-release changelog conventional-changelog conventional-commits github release publish

release-notes-generator's Introduction

release-notes-generator

semantic-release plugin to generate changelog content with conventional-changelog

Build Status npm latest version npm next version

Step Description
generateNotes Generate release notes for the commits added since the last release with conventional-changelog.

Install

$ npm install @semantic-release/release-notes-generator -D

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    [
      "@semantic-release/commit-analyzer",
      {
        "preset": "angular",
        "parserOpts": {
          "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
        }
      }
    ],
    [
      "@semantic-release/release-notes-generator",
      {
        "preset": "angular",
        "parserOpts": {
          "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
        },
        "writerOpts": {
          "commitsSort": ["subject", "scope"]
        }
      }
    ]
  ]
}

With this example:

  • the commits that contains BREAKING CHANGE, BREAKING CHANGES or BREAKING in their body will be considered breaking changes (by default the angular preset checks only for BREAKING CHANGE and BREAKING CHANGES)
  • the commits will be sorted in the changelog by subject then scope (by default the angular preset sort the commits in the changelog by scope then subject)

Configuration

Options

Option Description Default
preset conventional-changelog preset (possible values: angular, atom, codemirror, ember, eslint, express, jquery, jshint, conventionalcommits). angular
config NPM package name of a custom conventional-changelog preset. -
parserOpts Additional conventional-commits-parser options that will extends the ones loaded by preset or config. This is convenient to use a conventional-changelog preset with some customizations without having to create a new module. -
writerOpts Additional conventional-commits-writer options that will extends the ones loaded by preset or config. This is convenient to use a conventional-changelog preset with some customizations without having to create a new module. -
host The host used to generate links to issues and commits. See conventional-changelog-writer#host. The host from the repositoryurl option.
linkCompare Whether to include a link to compare changes since previous release in the release note. true
linkReferences Whether to include a link to issues and commits in the release note. See conventional-changelog-writer#linkreferences. true
commit Keyword used to generate commit links (formatted as <host>/<owner>/<repository>/<commit>/<commit_sha>). See conventional-changelog-writer#commit. commits for Bitbucket repositories, commit otherwise
issue Keyword used to generate issue links (formatted as <host>/<owner>/<repository>/<issue>/<issue_number>). See conventional-changelog-writer#issue. issue for Bitbucket repositories, issues otherwise
presetConfig Additional configuration passed to the conventional-changelog preset. Used for example with conventional-changelog-conventionalcommits. -

Notes: in order to use a preset it must be installed (for example to use the eslint preset you must install it with npm install conventional-changelog-eslint -D)

Note: config will be overwritten by the values of preset. You should use either preset or config, but not both.

Note: Individual properties of parserOpts and writerOpts will override ones loaded with an explicitly set preset or config. If preset or config are not set, only the properties set in parserOpts and writerOpts will be used.

Note: For presets that expects a configuration object, such as conventionalcommits, the presetConfig option must be set.

release-notes-generator's People

Contributors

alexanderbabel avatar dependabot[bot] avatar gr2m avatar greenkeeper[bot] avatar greenkeeperio-bot avatar hershmire avatar jsjoeio avatar lbg-marco-massarotto avatar martinmosegaard avatar mathieudutour avatar mehrad-rafigh avatar nlight avatar oscard0m avatar pvdlg avatar renovate[bot] avatar sheerlox avatar travi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

release-notes-generator's Issues

Feature Request: List release authors

We've been using this plugin for SemanticRelease and love it 🎉

We'd like to bring more attention to our community members and one of the ideas we had was to directly list the contributors for each release. Something like what date-fns does:

Screen Shot 2019-12-10 at 9 52 21 AM

Any desire for something like that to be built into this plugin?

referenceActions and issuePrefixes config are always overwritten by default values

Looking at the code

const {issue, commit, referenceActions, issuePrefixes} =
    find(HOSTS_CONFIG, conf => conf.hostname === hostname) || HOSTS_CONFIG.default;
const parsedCommits = commits.map(rawCommit => ({
    ...rawCommit,
    ...conventionalCommitsParser(rawCommit.message, {...parserOpts, referenceActions, issuePrefixes}),
  }));

you can see how, no matter what you do, the referenceActions and issuePrefixes value of the configured parserOpts are always overwritten by values specified in release-notes-generator. this means that you cannot configure, for example, jira like references

the cold should be

const parsedCommits = commits.map(rawCommit => ({
    ...rawCommit,
    ...conventionalCommitsParser(rawCommit.message, {referenceActions, issuePrefixes, ...parserOpts}),
  }));

Disable generator for pre-release

Hi,

I'm using 16.0.0-beta.19 of semantic release to handle pre-releases for other branches than master. The generator creates release notes which result in a merge conflict. Could it be made possible to skip the generator for releases from a pre-release branch without having to switch my configuration files?

An in-range update of conventional-changelog-angular is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 3.0.3 of conventional-changelog-angular was just published.

Branch Build failing 🚨
Dependency conventional-changelog-angular
Current Version 3.0.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

conventional-changelog-angular is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Comparison links in changelog not working for bitbucket

I've configured a couple of projects on bitbucket cloud to use semantic-release, and I've noticed a small issue where the comopare link the generated CHANGELOG.md results in a 404.

Description

Generated release note in CHANGELOG.md

# [1.1.0](http://bitbucket.org/<PROJECT>/<REPO>/compare/v1.0.0...v1.1.0) (2019-06-03)


### Features

* **foo:** my feature ([46b6609](http://bitbucket.org/<PROJECT>/<REPO>/commits/46b6609))

The link above results in a 404 on bitbucket, instead it should be (found on SO):

# [1.1.0](https://bitbucket.org/<PROJECT>/<REPO>/branches/compare/v1.1.0%0Dv1.0.0) (2019-06-03)

Solution

Is this a problem that you're aiming on fixing as part of this package (being that the major git hosting providers seams to be supported)?

Adding refactor/docs/style commits to generated release notes

I've configured commit-analyzer to flag docs, refactor, and style as patch releases. It's working as intended but the release-notes-generator output seems to only include feat and fix types by default, resulting in blank release notes for a version in which only any of these three types exist. Is it possible to override this behavior?

are the release notes regenerated from scratch on every release? or are only the latest commits appended to whatever is already there? (wondering if this can self-heal provided I can find a workaround for the above)

.releaserc

{
  "tagFormat": "${version}",
  "plugins": [
    ["@semantic-release/commit-analyzer", {
      "preset": "angular",
      "releaseRules": [
        {"type": "docs", "scope":"README", "release": "patch"},
        {"type": "refactor", "release": "patch"},
        {"type": "style", "release": "patch"}
      ],
      "parserOpts": {
        "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"]
      }
    }],
    "@semantic-release/release-notes-generator",
    ["@semantic-release/npm", {
      "npmPublish": false
    }],
    ["@semantic-release/changelog", {
      "changelogFile": "CHANGELOG.md",
    }],
    ["@semantic-release/git", {
      "message": "ci(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
    }]
  ]
}```

Does the latest release support semantic-release@v16-beta

I'm working on getting semantic-release@v16-beta setup in one of my projects using https://github.com/cycjimmy/semantic-release-action as a Github Action. Unfortunately many of the semantic-release plugins don't have the peerDependencies set up with the correct semver range.

I'm happy to create PRs to fix this in the plugins that are causing issues for me but I first want to ensure that the libraries that don't have a beta themselves (like this one for instance) are compatible with semantic-release@v16-beta.

Wrong links in release-notes

Hello all,

first thanks for your awesome work! Currently, we are using a selfhosted Gitlab instance to manage our internal source codes. I have a npm-package that is using semantic-release in order to create a Gitlab release. The problem is that the release-notes have wrong commit links.

Every commit is like this /binary-factory/wp-theme-binary-factory-ci-test/dev/6ebe4ac but it should be /binary-factory/wp-theme-binary-factory-ci-test/commit/6ebe4ac.

Here is my package.json:

{
  "name": "@binary-factory/wp-starter",
  "version": "0.0.0",
  "private": true,
  "description": "",
  "main": "index.js",
  "scripts": {
    "gulp": "gulp --gulpfile node_modules/@binary-factory/wp-builder/gulpfile.js --cwd .",
    "up": "docker-compose up",
    "wp": "docker-compose exec wordpress wp",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "[email protected]:binary-factory/wp-theme-binary-factory-ci-test.git"
  },
  "author": "binary-factory",
  "license": "ISC",
  "devDependencies": {
    "@binary-factory/wp-builder": "^1.0.1",
    "@semantic-release/changelog": "^3.0.4",
    "@semantic-release/exec": "^3.3.7",
    "@semantic-release/git": "^7.0.16",
    "@semantic-release/gitlab": "^4.0.0",
    "@types/jquery": "^3.3.30",
    "bootstrap": "^4.3.1",
    "gulp-cli": "^2.2.0",
    "jquery": "^3.4.1",
    "semantic-release": "^15.13.24"
  },
  "dependencies": {
    "normalize-scss": "^7.0.1",
    "sass-burger": "^1.3.1"
  },
  "release": {
    "plugins": [
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator",
      "@semantic-release/changelog",
      "@semantic-release/npm",
      [
        "@semantic-release/exec",
        {
          "prepareCmd": "npm run gulp bundle"
        }
      ],
      "@semantic-release/git",
      [
        "@semantic-release/gitlab",
        {
          "assets": [
            {
              "path": "package/*.zip",
              "label": "Theme"
            }
          ]
        }
      ]
    ]
  }
}

Do you have any clues what is the problem here?
Thank you in advance for your time!

Best regards
Oliver Haase

Changelog version url - transposes ssh port number to HTTP URL

I'm seeing incorrect URLs on release number links show up in my release notes for both GitLab and Changelog, which means it's probably coming from @semantic-release/release-notes-generator. In short, the port number used for the git SSH is being incorrectly copied into the URL for the HTTP links in the release notes.

Steps to Reproduce

  1. Configure a package to use @semantic-release/gitlab and @semantic-release/changelog
  2. Configure package.json to use an SSH connection Gitlab repo over a specified port:
"repository": {
    "type": "git",
    "url": "git+ssh://[email protected]:2222/MY-GROUP/my-repo.git"
  },
  1. Run semantic-release
  2. Visit the "releases" list on the Gitlab repo web GUI
  3. Inspect the generated link on the version number that is created for comparing releases
Screen Shot 2019-11-14 at 12 43 21 PM
  1. Visit the generated CHANGELOG.md and inspect the link there as well

Expected Results

Link has a path to the Gitlab compare feature:

<a href="https://gitlab.example.com/MY-GROUP/my-repo/compare/v3.5.1...v3.6.0">3.6.0</a>

Actual Results

Link has an absolute path with an incorrect port number injected:

<a href="https://gitlab.example.com:2222/MY-GROUP/my-repo/compare/v3.5.1...v3.6.0">3.6.0</a>

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): lock file maintenance

Other Branches

These updates are pending. To force PRs open, click the checkbox below.

  • fix(deps): replace dependency read-pkg-up with read-package-up ^11.0.0

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/release.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
.github/workflows/test.yml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
npm
package.json
  • conventional-changelog-angular ^7.0.0
  • conventional-changelog-writer ^7.0.0
  • conventional-commits-filter ^4.0.0
  • conventional-commits-parser ^5.0.0
  • debug ^4.0.0
  • get-stream ^7.0.0
  • import-from-esm ^1.0.3
  • into-stream ^7.0.0
  • lodash-es ^4.17.21
  • read-pkg-up ^11.0.0
  • ava 6.1.2
  • c8 9.1.0
  • conventional-changelog-atom 4.0.0
  • conventional-changelog-conventionalcommits 7.0.2
  • conventional-changelog-ember 4.0.0
  • conventional-changelog-eslint 5.0.0
  • conventional-changelog-express 4.0.0
  • conventional-changelog-jshint 4.0.0
  • escape-string-regexp 5.0.0
  • fs-extra 11.2.0
  • lockfile-lint 4.13.2
  • ls-engines 0.9.1
  • npm-run-all2 6.1.2
  • prettier 3.2.5
  • publint 0.2.7
  • semantic-release 23.0.8
  • sinon 17.0.1
  • stream-buffers 3.0.2
  • tempy 3.1.0
  • testdouble 3.20.2
  • semantic-release >=20.1.0
  • node >=20.8.1
  • npm 10.5.2
nvm
.nvmrc
  • node 20

  • Check this box to trigger a request for Renovate to run again on this repository

How to generate note with custom sections?

Hi, i'm trying generate release notes with custom sections, but my configuration isn't working...
I read the issues:

I don't know which setting to use

My .releaserc.json file:

{
  "branch": "master",
  "plugins": [
    [
      "@semantic-release/commit-analyzer",
      {
        "releaseRules": [
          {
            "type": "refactor",
            "release": "patch"
          },
          {
            "type": "docs",
            "release": "patch"
          },
          {
            "type": "test",
            "release": "patch"
          },
          {
            "type": "style",
            "release": "patch"
          },
          {
            "type": "perf",
            "release": "patch"
          },
          {
            "type": "build",
            "release": "patch"
          }
        ]
      }
    ],
    [
      "@semantic-release/release-notes-generator",
      {
        "writerOpts": {
          "types": [
            {
              "type": "feat",
              "section": ":sparkles: Novidades",
              "hidden": false
            },
            {
              "type": "fix",
              "section": ":bug: Correções",
              "hidden": false
            },
            {
              "type": "docs",
              "section": ":memo: Documentação",
              "hidden": false
            },
            {
              "type": "style",
              "section": ":barber: Estilização",
              "hidden": false
            },
            {
              "type": "refactor",
              "section": ":zap: Refatoração",
              "hidden": false
            },
            {
              "type": "perf",
              "section": ":fast_forward: Refatoração",
              "hidden": false
            },
            {
              "type": "test",
              "section": ":white_check_mark: Testes",
              "hidden": false
            },
            {
              "type": "chore",
              "hidden": true
            }
          ]
        }
      }
    ],
    [
      "@semantic-release/changelog",
      {
        "changelogFile": "CHANGELOG.md",
        "changelogTitle": "Notas de versão"
      }
    ],
    [
      "@semantic-release/git",
      {
        "assets": [
          "CHANGELOG.md"
        ],
        "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
      }
    ],
    [
      "@semantic-release/github",
      {
        "assets": [
          {
            "path": "server.zip",
            "label": "DeltaWeb - Build: ${nextRelease.gitTag}",
            "name": "server-${nextRelease.gitTag}.zip"
          }
        ]
      }
    ]
  ]
}

An in-range update of conventional-changelog-atom is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 0.2.6 of conventional-changelog-atom was just published.

Branch Build failing 🚨
Dependency conventional-changelog-atom
Current Version 0.2.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

conventional-changelog-atom is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Changing the date format

I wanted to change the date format, next to each release. The default format is yyyy-mm-dd. I looked at conventional-changelog-writer properties and saw that there is a transform method that formats committerDate with yyyy-mm-dd. But because it's a function, I don't really know how am I supposed to hook into it from my .releaserc file.

Looking at the source code of conventional-changelog-writer, the default transform method is

options.transform = _.assign({
      hash: function (hash) {
        if (_.isString(hash)) {
          return hash.substring(0, 7)
        }
      },
      header: function (header) {
        return header.substring(0, 100)
      },
      committerDate: function (date) {
        if (!date) {
          return
        }

        return dateFormat(date, 'yyyy-mm-dd', true)
      }
    }, options.transform)

I tried the following but it fails.

branches:
  - master
plugins:
  - - "@semantic-release/commit-analyzer"
    - preset: conventionalcommits
  - - "@semantic-release/release-notes-generator"
    - preset: conventionalcommits
      writerOpts:
        date: dateFormat(new Date(), 'yyyy/mm/dd', true)
        transform: |
          _.assign({
            hash: function (hash) {
              if (_.isString(hash)) {
                return hash.substring(0, 7)
              }
            },
            header: function (header) {
              return header.substring(0, 100)
            },
            committerDate: function (date) {
              if (!date) {
                return
              }

              return dateFormat(date, 'yyyy/mm/dd', true)
            }
          }, options.transform)

Question: How to configure "angular" preset to print docs, style, etc.

Hi guys,
i made a lot of research and even sniffed the repositories to find a proper solution but it doesn't work out for me. Therefore i decided to ask here for help.

My goal is to generateNotes even for commits prefixed with docs:, style:, ci:, etc.
Right now only fix:, feat: and breacking change are printed to CHANGELOG.md and GitHub releases.

My configuration looks like this:

{
    "release": {
        "verifyConditions": [
            "@semantic-release/changelog",
            "@semantic-release/github"
        ],
        "analyzeCommits": {
            "preset": "angular",
            "releaseRules": [
                {
                    "type": "docs",
                    "release": "patch"
                },
                {
                    "type": "refactor",
                    "release": "patch"
                },
                {
                    "type": "style",
                    "release": "patch"
                }
            ]
        },
        "generateNotes": {
            "preset": "angular"
        },
        "prepare": [
            "@semantic-release/changelog",
            "@semantic-release/git"
        ],
        "publish": [
            "@semantic-release/github"
        ]
    }
}

I know that angular is the default preset for generateNotes but i added it to be explicit for everyone.

I appreciate every single hint, link or solution snippet.

Thanks in advance.

An in-range update of semantic-release is breaking the build 🚨

Version 15.9.8 of semantic-release was just published.

Branch Build failing 🚨
Dependency semantic-release
Current Version 15.9.7
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes v15.9.8

15.9.8 (2018-08-10)

Bug Fixes

  • package: update get-stream to version 4.0.0 (e882096)
Commits

The new version differs by 1 commits.

  • e882096 fix(package): update get-stream to version 4.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

replace travis with actions

Part of semantic-release/semantic-release#1692

Todos

  • delete .travis.yml
  • create .github/workflows/{test,release}.yml (copy from https://github.com/semantic-release/npm/tree/master/.github/workflows)
  • remove package-lock.json from .gitignore
  • delete .npmrc and .yarnrc
  • README
    • remove travis/codecov badges
    • add actions badge instead (replace REPO NAME HERE ;): [![Build Status](https://github.com/semantic-release/[REPO NAME HERE]/workflows/Test/badge.svg)](https://github.com/semantic-release/[REPO NAME HERE]/actions?query=workflow%3ATest+branch%3Amaster)
  • create package-json.lock
  • add to package.json:
    • test:ci script which doesn't run lint pre script

    • renovate config

         "renovate": {
           "extends": [
             "github>semantic-release/.github"
           ]
         }
      
  • update branch protection: remove required status by Travis and Codecov, add required status for "test" (wait for first build of PR)
  • uninstall codecov and remove it from scripts

Only generate release notes for certain scopes

Hi,
in my package.json I have the following setup:

    "branches": [
      "master"
    ],
    "tagFormat": "react_v${version}",
    "plugins": [
      [
        "@semantic-release/commit-analyzer",
        {
          "preset": "conventionalcommits",
          "releaseRules": [
            {
              "scope": "!*react*",
              "release": false
            }
          ]
        }
      ],
      "@semantic-release/release-notes-generator",
      [
        "@semantic-release/gitlab",
        {
          "gitlabUrl": "https://gitlab.example.com/",
          "assets": []
        }
      ],
      "@semantic-release/npm"
    ]
  },

as you can see, only commits with the react scope will trigger a new release. The problem is, release-notes-generator will still add ignored commits to the release notes. Is there a way to configure release-notes-generator to only parse commits with a certain scope?

Finish move of new release-notes-generator plugin

  • change the package name to @semantic-release/release-notes-generator
  • manually release @semantic-release/[email protected], create the git tag and release and add all changelogs
  • deprecate the sr-release-notes-generator package and point it to @semantic-release/release-notes-generator
  • setup the integrations in the semantic-release/release-notes-generator repository (I can make you admin for that repo, then I think you should be able to do it yourself)
  • merge the update to semantic-release semantic-release/semantic-release#435
  • Comment on semantic-release/semantic-release#411 to let folks now about the new core plugin 🎉

follow up for #12

An in-range update of conventional-commits-parser is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 2.1.7 of conventional-commits-parser was just published.

Branch Build failing 🚨
Dependency conventional-commits-parser
Current Version 2.1.6
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

conventional-commits-parser is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Changelog commit url - trimmed too much

Hello,

I believe this issue will relate to the #110 change.

We have a number of repos which have '-blueprint' at the end of the name. The url in the changelog for a commit is being trimmed so that the 't' is missing.

As you can see in this changelog. Up until the 1st Nov, the urls were correct.

Since then & the above change they are being trimmed too much and the url is looking like this

https://github.com/wmfs/addressbase-premium-blueprin/commit/bee2cd2

Add a 't' to the url and it works fine.

This is occurring in all changelogs of our -blueprint repos (including private ones). I haven't found it occurring in anything else.

confusing config property name `noteKeywords`

  1. release > generateNotes > parserOpts > noteKeywords used to indicate important notes (sets release type be major) is not self-describing - for example breakingChangeKeywords could be used instead

  2. documentation could be adjusted to inform that given keywords must appear at the beginning of the comment line

Question: configuration for custom settings commit-analyzer settings

Hi, I recently added the below configuration for semantic-release/commit-analyzer. More details here: semantic-release/commit-analyzer#162

{
  "plugins": [
    ["@semantic-release/commit-analyzer", {
      "preset": "eslint",
      "releaseRules": [
        {
          "tag": "Breaking",
          "release": "major"
        },
        {
          "tag": "breaking",
          "release": "major"
        },
        {
          "tag": "New",
          "release": "minor"
        },
        {
          "tag": "new",
          "release": "minor"
        },
        {
          "subject": "no-release:",
          "release": false
        },
        {
          "subject": "!no-release:*",
          "release": "patch"
        }
      ],
      "parserOpts": {
        "noteKeywords": [
          "BREAKING CHANGE",
          "BREAKING CHANGES"
        ]
      }
    }],
    ["@semantic-release/release-notes-generator", {
      "preset": "conventionalcommits",
      "presetConfig": {
        "types": [
          {
            "tag": "Breaking",
            "section": ":sparkles: Breaking",
            "hidden": false
          },
          {
            "tag": "breaking",
            "section": ":sparkles: Breaking",
            "hidden": false
          },
          {
            "tag": "new",
            "section": ":memo: New",
            "hidden": false
          },
          {
            "tag": "New",
            "section": ":memo: New",
            "hidden": false
          }
        ]
      }
    }]
  ]
}

After adding these the release-notes-generator is not creating release notes. I am looking at the config for release-notes-generator and changed .releaserc like below, but wanted to ask if I am in the right direction and if the above custom commit-analyzer will work with release-notes-generator? Currently debugging but any pointers will help.

[12:01:25 AM] [semantic-release] › ℹ  Running semantic-release version 16.0.1
  semantic-release:config load config from: /home/circleci/project/.releaserc.json +0ms
  semantic-release:config options values: {
  semantic-release:config   branches: [
  semantic-release:config     '+([0-9])?(.{+([0-9]),x}).x',
  semantic-release:config     'master',
  semantic-release:config     'next',
  semantic-release:config     'next-major',
  semantic-release:config     { name: 'beta', prerelease: true },
  semantic-release:config     { name: 'alpha', prerelease: true }
  semantic-release:config   ],
  semantic-release:config   repositoryUrl: 'https://git.corp.domain.com/new/dummy-cci-release.git',
  semantic-release:config   tagFormat: 'v${version}',
  semantic-release:config   plugins: [
  semantic-release:config     [ '@semantic-release/commit-analyzer', [Object] ],
  semantic-release:config     [ '@semantic-release/release-notes-generator', [Object] ]
  semantic-release:config   ],
  semantic-release:config   _: [],
  semantic-release:config   debug: true,
  semantic-release:config   '$0': 'node_modules/.bin/semantic-release'
  semantic-release:config } +4ms
  semantic-release:plugins options for @semantic-release/commit-analyzer/analyzeCommits: {
  semantic-release:plugins   preset: 'eslint',
  semantic-release:plugins   releaseRules: [
  semantic-release:plugins     { tag: 'Breaking', release: 'major' },
  semantic-release:plugins     { tag: 'breaking', release: 'major' },
  semantic-release:plugins     { tag: 'New', release: 'minor' },
  semantic-release:plugins     { tag: 'new', release: 'minor' },
  semantic-release:plugins     { subject: 'no-release:', release: false },
  semantic-release:plugins     { subject: '!no-release:*', release: 'patch' }
  semantic-release:plugins   ],
  semantic-release:plugins   parserOpts: { noteKeywords: [ 'BREAKING CHANGE', 'BREAKING CHANGES' ] }
  semantic-release:plugins } +0ms
[12:01:25 AM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
  semantic-release:plugins options for @semantic-release/release-notes-generator/generateNotes: {
  semantic-release:plugins   preset: 'conventionalcommits',
  semantic-release:plugins   presetConfig: { types: [ [Object], [Object], [Object], [Object] ] }
  semantic-release:plugins } +1ms
[12:01:25 AM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
  semantic-release:get-tags found tags for branch master: [ { gitTag: 'v1.0.0', version: '1.0.0', channels: [ null ] }, { gitTag: 'v1.1.0', version: '1.1.0', channels: [ null ] }, { gitTag: 'v1.2.0', version: '1.2.0', channels: [ null ] }, { gitTag: 'v1.2.1', version: '1.2.1', channels: [ null ] }, { gitTag: 'v2.0.0', version: '2.0.0', channels: [ null ] }, { gitTag: 'v2.1.0', version: '2.1.0', channels: [ null ] }, { gitTag: 'v2.1.1', version: '2.1.1', channels: [ null ] }, { gitTag: 'v3.0.0', version: '3.0.0', channels: [ null ] }, { gitTag: 'v4.0.0', version: '4.0.0', channels: [ null ] }, { gitTag: 'v4.1.0', version: '4.1.0', channels: [ null ] }, { gitTag: 'v4.2.0', version: '4.2.0', channels: [ null ] }, { gitTag: 'v4.2.1', version: '4.2.1', channels: [ null ] }, { gitTag: 'v4.2.2', version: '4.2.2', channels: [ null ] }, { gitTag: 'v4.3.0', version: '4.3.0', channels: [ null ] }, { gitTag: 'v5.0.0', version: '5.0.0', channels: [ null ] }, { gitTag: 'v5.0.1', version: '5.0.1', channels: [ null ] }, { gitTag: 'v5.0.2', version: '5.0.2', channels: [ null ] }, { gitTag: 'v5.0.3', version: '5.0.3', channels: [ null ] }, { gitTag: 'v6.0.0', version: '6.0.0', channels: [ null ] }, { gitTag: 'v6.1.0', version: '6.1.0', channels: [ null ] }, { gitTag: 'v6.1.1', version: '6.1.1', channels: [ null ] }, { gitTag: 'v6.1.2', version: '6.1.2', channels: [ null ] }, { gitTag: 'v6.1.3', version: '6.1.3', channels: [ null ] }, { gitTag: 'v6.1.4', version: '6.1.4', channels: [ null ] }, { gitTag: 'v7.0.0', version: '7.0.0', channels: [ null ] }, { gitTag: 'v7.1.0', version: '7.1.0', channels: [ null ] } ] +0ms
[12:01:26 AM] [semantic-release] › ✔  Run automated release from branch master
[12:01:26 AM] [semantic-release] › ✔  Allowed to push to the Git repository
[12:01:26 AM] [semantic-release] › ℹ  Found git tag v7.1.0 associated with version 7.1.0 on branch master
  semantic-release:get-commits Use from: 2ac50fc80acfc298cc36f4ba14bd71c2167bea33 +0ms
[12:01:26 AM] [semantic-release] › ℹ  Found 7 commits since last release
  semantic-release:get-commits Parsed commits: [ { commit: { long: 'e1352949b238c890633f05b2140f538adc5e7360', short: 'e135294' }, tree: { long: 'a487b51038ad8c759a57c51d3009470f357305f1', short: 'a487b51' }, author: { name: 'user', email: '[email protected]', date: 2020-01-22T23:58:46.000Z }, committer: { name: 'GitHub Enterprise', email: '[email protected]', date: 2020-01-22T23:58:46.000Z }, subject: 'new: Feature57 (#64)', body: '* release notes 7\r\n\r\n* release notes 8\r\n', hash: 'e1352949b238c890633f05b2140f538adc5e7360', committerDate: 2020-01-22T23:58:46.000Z, message: 'new: Feature57 (#64)\n\n* release notes 7\r\n\r\n* release notes 8', gitTags: '(HEAD -> master, origin/master, origin/HEAD)' }, { commit: { long: '349ff5e3a0fbdf1d52bf2c60fe1530c812009bb3', short: '349ff5e' }, tree: { long: 'c6aff71d0caa14a072163e931b016ddd3f7dac32', short: 'c6aff71' }, author: { name: 'user', email: '[email protected]', date: 2020-01-22T23:42:50.000Z }, committer: { name: 'GitHub Enterprise', email: '[email protected]', date: 2020-01-22T23:42:50.000Z }, subject: 'new: release notes 7 (#63)', body: '', hash: '349ff5e3a0fbdf1d52bf2c60fe1530c812009bb3', committerDate: 2020-01-22T23:42:50.000Z, message: 'new: release notes 7 (#63)', gitTags: '' }, { commit: { long: 'b80a060d47bf845401e6535c7be8d350428ee768', short: 'b80a060' }, tree: { long: '8b45956648ba15af515907a832612253f3f0f22e', short: '8b45956' }, author: { name: 'user', email: '[email protected]', date: 2020-01-22T23:39:24.000Z }, committer: { name: 'GitHub Enterprise', email: '[email protected]', date: 2020-01-22T23:39:24.000Z }, subject: 'new: Feature56 (#62)', body: '* release notes 1\r' + '\n\r' + '\n* release notes 2\r' + '\n\r' + '\n* release notes 3\r' + '\n\r' + '\n* release notes 4\r' + '\n\r' + '\n* release notes 5\r' + '\n\r' + '\n* release notes 6\r' + '\n', hash: 'b80a060d47bf845401e6535c7be8d350428ee768', committerDate: 2020-01-22T23:39:24.000Z, message: 'new: Feature56 (#62)\n\n* release notes 1\r' + '\n\r' + '\n* release notes 2\r' + '\n\r' + '\n* release notes 3\r' + '\n\r' + '\n* release notes 4\r' + '\n\r' + '\n* release notes 5\r' + '\n\r' + '\n* release notes 6', gitTags: '' }, { commit: { long: 'f678c9ca1305771ea6b495d827ac7d847087fa4c', short: 'f678c9c' }, tree: { long: '8b45956648ba15af515907a832612253f3f0f22e', short: '8b45956' }, author: { name: 'user', email: '[email protected]', date: 2020-01-22T23:31:01.000Z }, committer: { name: 'GitHub Enterprise', email: '[email protected]', date: 2020-01-22T23:31:01.000Z }, subject: 'New: Feature56 (#61)', body: '* release notes 1\r' + '\n\r' + '\n* release notes 2\r' + '\n\r' + '\n* release notes 3\r' + '\n\r' + '\n* release notes 4\r' + '\n\r' + '\n* release notes 5\r' + '\n', hash: 'f678c9ca1305771ea6b495d827ac7d847087fa4c', committerDate: 2020-01-22T23:31:01.000Z, message: 'New: Feature56 (#61)\n\n* release notes 1\r' + '\n\r' + '\n* release notes 2\r' + '\n\r' + '\n* release notes 3\r' + '\n\r' + '\n* release notes 4\r' + '\n\r' + '\n* release notes 5', gitTags: '' }, { commit: { long: 'e576483bb0e637f2bf443f5cddeadbd47e67fee2', short: 'e576483' }, tree: { long: '8b45956648ba15af515907a832612253f3f0f22e', short: '8b45956' }, author: { name: 'user', email: '[email protected]', date: 2020-01-22T23:13:04.000Z }, committer: { name: 'GitHub Enterprise', email: '[email protected]', date: 2020-01-22T23:13:04.000Z }, subject: 'New: Feature56 (#60)', body: '* release notes 1\r' + '\n\r' + '\n* release notes 2\r' + '\n\r' + '\n* release notes 3\r' + '\n\r' + '\n* release notes 4\r' + '\n', hash: 'e576483bb0e637f2bf443f5cddeadbd47e67fee2', committerDate: 2020-01-22T23:13:04.000Z, message: 'New: Feature56 (#60)\n\n* release notes 1\r' + '\n\r' + '\n* release notes 2\r' + '\n\r' + '\n* release notes 3\r' + '\n\r' + '\n* release notes 4', gitTags: '' }, { commit: { long: '097201d6c63fad2b43c307bc6dba1f8b5e20b555', short: '097201d' }, tree: { long: '8b45956648ba15af515907a832612253f3f0f22e', short: '8b45956' }, author: { name: 'user', email: '[email protected]', date: 2020-01-22T23:03:50.000Z }, committer: { name: 'GitHub Enterprise', email: '[email protected]', date: 2020-01-22T23:03:50.000Z }, subject: 'New: Feature56 (#59)', body: '* release notes 1\r\n\r\n* release notes 2\r\n\r\n* release notes 3\r\n', hash: '097201d6c63fad2b43c307bc6dba1f8b5e20b555', committerDate: 2020-01-22T23:03:50.000Z, message: 'New: Feature56 (#59)\n\n* release notes 1\r' + '\n\r' + '\n* release notes 2\r' + '\n\r' + '\n* release notes 3', gitTags: '' }, { commit: { long: 'ade2fbd1ff25942c19d688b4fc688aada82d179b', short: 'ade2fbd' }, tree: { long: 'c6aff71d0caa14a072163e931b016ddd3f7dac32', short: 'c6aff71' }, author: { name: 'user', email: '[email protected]', date: 2020-01-22T22:51:55.000Z }, committer: { name: 'GitHub Enterprise', email: '[email protected]', date: 2020-01-22T22:51:55.000Z }, subject: 'New: Feature56 (#58)', body: '* release notes 1\r\n\r\n* release notes 2\r\n', hash: 'ade2fbd1ff25942c19d688b4fc688aada82d179b', committerDate: 2020-01-22T22:51:55.000Z, message: 'New: Feature56 (#58)\n\n* release notes 1\r\n\r\n* release notes 2', gitTags: '' } ] +11ms
[12:01:26 AM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: new: Feature57 (#64)

* release notes 7



* release notes 8
  semantic-release:commit-analyzer Analyzing with custom rules +0ms
  semantic-release:commit-analyzer The rule { tag: 'new', release: 'minor' } match commit with release type 'minor' +0ms
  semantic-release:commit-analyzer The rule { subject: '!no-release:*', release: 'patch' } match commit with release type 'patch' but the higher release type 'minor' has already been found for this commit +0ms
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is minor
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: new: release notes 7 (#63)
  semantic-release:commit-analyzer Analyzing with custom rules +9ms
  semantic-release:commit-analyzer The rule { tag: 'new', release: 'minor' } match commit with release type 'minor' +1ms
  semantic-release:commit-analyzer The rule { subject: '!no-release:*', release: 'patch' } match commit with release type 'patch' but the higher release type 'minor' has already been found for this commit +0ms
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is minor
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: new: Feature56 (#62)

* release notes 1



* release notes 2



* release notes 3



* release notes 4



* release notes 5



* release notes 6
  semantic-release:commit-analyzer Analyzing with custom rules +1ms
  semantic-release:commit-analyzer The rule { tag: 'new', release: 'minor' } match commit with release type 'minor' +0ms
  semantic-release:commit-analyzer The rule { subject: '!no-release:*', release: 'patch' } match commit with release type 'patch' but the higher release type 'minor' has already been found for this commit +0ms
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is minor
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: New: Feature56 (#61)

* release notes 1



* release notes 2



* release notes 3



* release notes 4



* release notes 5
  semantic-release:commit-analyzer Analyzing with custom rules +1ms
  semantic-release:commit-analyzer The rule { tag: 'New', release: 'minor' } match commit with release type 'minor' +1ms
  semantic-release:commit-analyzer The rule { subject: '!no-release:*', release: 'patch' } match commit with release type 'patch' but the higher release type 'minor' has already been found for this commit +0ms
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is minor
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: New: Feature56 (#60)

* release notes 1



* release notes 2



* release notes 3



* release notes 4
  semantic-release:commit-analyzer Analyzing with custom rules +0ms
  semantic-release:commit-analyzer The rule { tag: 'New', release: 'minor' } match commit with release type 'minor' +0ms
  semantic-release:commit-analyzer The rule { subject: '!no-release:*', release: 'patch' } match commit with release type 'patch' but the higher release type 'minor' has already been found for this commit +1ms
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is minor
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: New: Feature56 (#59)

* release notes 1



* release notes 2



* release notes 3
  semantic-release:commit-analyzer Analyzing with custom rules +1ms
  semantic-release:commit-analyzer The rule { tag: 'New', release: 'minor' } match commit with release type 'minor' +0ms
  semantic-release:commit-analyzer The rule { subject: '!no-release:*', release: 'patch' } match commit with release type 'patch' but the higher release type 'minor' has already been found for this commit +0ms
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is minor
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: New: Feature56 (#58)

* release notes 1



* release notes 2
  semantic-release:commit-analyzer Analyzing with custom rules +0ms
  semantic-release:commit-analyzer The rule { tag: 'New', release: 'minor' } match commit with release type 'minor' +1ms
  semantic-release:commit-analyzer The rule { subject: '!no-release:*', release: 'patch' } match commit with release type 'patch' but the higher release type 'minor' has already been found for this commit +0ms
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is minor
[12:01:26 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 7 commits complete: minor release
[12:01:26 AM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[12:01:26 AM] [semantic-release] › ℹ  The next release version is 7.2.0
[12:01:26 AM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
  semantic-release:release-notes-generator version: '7.2.0' +0ms
  semantic-release:release-notes-generator host: undefined +0ms
  semantic-release:release-notes-generator owner: 'new' +0ms
  semantic-release:release-notes-generator repository: 'dummy-cci-release' +0ms
  semantic-release:release-notes-generator previousTag: 'v7.1.0' +1ms
  semantic-release:release-notes-generator currentTag: 'v7.2.0' +0ms
  semantic-release:release-notes-generator host: 'https://git.corp.domain.com' +0ms
  semantic-release:release-notes-generator host: 'https://git.corp.domain.com' +0ms
  semantic-release:release-notes-generator linkReferences: undefined +0ms
  semantic-release:release-notes-generator issue: 'issues' +0ms
  semantic-release:release-notes-generator commit: 'commit' +0ms
[12:01:26 AM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[12:01:33 AM] [semantic-release] › ✔  Created tag v7.2.0
[12:01:33 AM] [semantic-release] › ✔  Published release 7.2.0 on default channel

Fails with AWS CodeCommit repository URLs

The plugin fails if the git repository uses a "non-standard"git URL, e.g., AWS CodeCommit URLs:

codecommit::eu-central-1://<profile>@<repository name>

I turned link generation of, but the plugin tries to parse the URL anyway:

[15:26:27] [semantic-release] » i  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[15:26:27] [semantic-release] » ×  Failed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[15:26:27] [semantic-release] » ×  An error occurred while running semantic-release: TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
    at generateNotes (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\@semantic-release\release-notes-generator\index.js:40:33)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async validator (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\normalize.js:34:24)
    at async C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\pipeline.js:37:34
    at async C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\pipeline.js:31:3
    at async Object.pluginsConf.<computed> [as generateNotes] (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\index.js:80:11)
    at async run (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\index.js:183:23)
    at async module.exports (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\index.js:260:22)
    at async module.exports (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\cli.js:55:5) {
  pluginName: '@semantic-release/release-notes-generator'
}
TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
    at generateNotes (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\@semantic-release\release-notes-generator\index.js:40:33)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async validator (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\normalize.js:34:24)
    at async C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\pipeline.js:37:34
    at async C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\pipeline.js:31:3
    at async Object.pluginsConf.<computed> [as generateNotes] (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\lib\plugins\index.js:80:11)
    at async run (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\index.js:183:23)
    at async module.exports (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\index.js:260:22)
    at async module.exports (C:\Users\CASAATHO\Development\aws-ewe-roles\node_modules\semantic-release\cli.js:55:5) {
  pluginName: '@semantic-release/release-notes-generator'
}

The fix seems to be to check the result of the match for null and assign the empty array.

Passing empty writerOpts

I'm trying to understand how this works. I'm using the following test case:

test('Show features on empty writerOpts', async t => {
  const commits = [
    {hash: '111', message: 'chore(scope1): First chore'},
    {hash: '222', message: 'chore(scope2): Second chore'},
    {hash: '333', message: 'feat(scope3): First feature'},
  ];
  const changelog = await releaseNotesGenerator(
    {writerOpts: {}},
    {options: {repositoryUrl}, lastRelease, nextRelease, commits}
  );

  t.regex(changelog, new RegExp(escape('(https://github.com/owner/repo/compare/v1.0.0...v2.0.0)')));
  t.regex(changelog, /### Features/);
  t.regex(
    changelog,
    new RegExp(escape('* **scope3:** First feature ([333](https://github.com/owner/repo/commit/333))'))
  );
});

but it fails

   37:
   38:   t.regex(changelog, new RegExp(escape('(https://github.com/owner/repo/compare/v1.0.0...v2.0.0)')));
   39:   t.regex(changelog, /### Features/);

  Value must match expression:

  `## 2.0.0 (2018-06-28)?
  ?
  * chore(scope1): First chore ([111](https://github.com/owner/repo/commit/111))?
  * chore(scope2): Second chore ([222](https://github.com/owner/repo/commit/222))?
  * feat(scope3): First feature ([333](https://github.com/owner/repo/commit/333))?
  ?
  ?
  ?
  `

  Regular expression:

  /\(https:\/\/github\.com\/owner\/repo\/compare\/v1\.0\.0\.\.\.v2\.0\.0\)/

  changelog
  => `## 2.0.0 (2018-06-28)?
  ?
  * chore(scope1): First chore ([111](https://github.com/owner/repo/commit/111))?
  * chore(scope2): Second chore ([222](https://github.com/owner/repo/commit/222))?
  * feat(scope3): First feature ([333](https://github.com/owner/repo/commit/333))?
  ?
  ?
  ?
  `

Without passing an empty writerOpts, the test passes.

const changelog = await releaseNotesGenerator({}, {options: {repositoryUrl}, lastRelease, nextRelease, commits});

Is this how it's supposed to behave? I thought and empty writerOpts would have no effect, since the documentation says: writerOpts: Additional conventional-commits-writer options that will extends ones loaded by preset or config. See Writer options.

tagFormat not respected in markdown headings during changelog generation

I'm not sure if this is the correct place to ask this question but it seems like the tagFormat value from .releaserc is not followed when generating the actual changelog.

For example, my tagFormat is tagFormat: "1.5.6-${version}"

However, the changelog creates headings like ## [1.0.0-develop.2](https://my.gitlab.repo.com/ctek/docker/packer/compare/1.5.6-1.0.0-develop.1...1.5.6-1.0.0-develop.2) (2020-05-04)

Note that the compare links are correct but the heading is not.

An in-range update of semantic-release is breaking the build 🚨

Version 15.7.0 of semantic-release was just published.

Branch Build failing 🚨
Dependency semantic-release
Current Version 15.6.6
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes v15.7.0

15.7.0 (2018-07-10)

Bug Fixes

  • do not set path to plugin config defined as a Function or an Array (f93eeb7)

Features

  • allow to define multiple generateNotes plugins (5989989)
Commits

The new version differs by 12 commits.

  • 24ce560 refactor: build plugin pipeline parameters at initialization
  • eb26254 refactor: use Object.entries rather than Object.keys
  • 50061bb refactor: remove unnecessary object destructuring
  • 5989989 feat: allow to define multiple generateNotes plugins
  • 576eb60 refactor: simplify plugin validation
  • f7f4aab refactor: use the lastInput arg to compute the prepare pipeline next input
  • 12de628 refactor: fix incorrect comments in lib/plugins/pipeline.js
  • d303286 docs: fix default value for analyzeCommits plugin
  • ed9c456 refactor: always return an Array of results/errors from a plugin pipeline
  • cac4882 docs: clarify verifyRelease plugin description
  • 09348f1 style: disable max-params warning for lib/plugins/normalize.js
  • f93eeb7 fix: do not set path to plugin config defined as a Function or an Array

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of prettier is breaking the build 🚨

Version 1.7.1 of prettier just got published.

Branch Build failing 🚨
Dependency prettier
Current Version 1.7.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As prettier is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Change header of release-notes

Is it possible to configure release-notes-generator to use the ${nextRelease.gitTag} instead of ${nextRelease.version} ?

I tried:

[
            "@semantic-release/release-notes-generator",
            {
                "linkCompare": false,
                "writerOpts": {
                    "version": "${nextRelease.gitTag}"
                }
            }
        ],

without success.

barebones usage in readme

problem

it is unclear what the absolute minimum config that is required to use this module. is npm i -D <pkgname> sufficient? or do i need an entry into my pkg.json

An in-range update of conventional-changelog-eslint is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 1.0.7 of conventional-changelog-eslint was just published.

Branch Build failing 🚨
Dependency conventional-changelog-eslint
Current Version 1.0.6
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

conventional-changelog-eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of conventional-changelog-writer is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 3.0.6 of conventional-changelog-writer was just published.

Branch Build failing 🚨
Dependency conventional-changelog-writer
Current Version 3.0.5
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

conventional-changelog-writer is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Support Azure Devops

Hi

I'm using semantic-release with GIT on Azure Devops (not my choice).

Unfortunately Azure Devops is not covered by hosts-config.js and I have to adjust urls for issues and commits, because Azure Devops isn't following the normal url pattern - see this.

In order to do this I've tried using custom partials in writerOpts, but I have a few cases where this is not enough. If however I could modify the context (not just finalizeContext), I could make everything work correctly.

So my suggestion is to make it possible to provide changelogContext through Options, in order to handle edge cases, where hosts-config.js isn't covering.

Something like this:

module.exports = {
  plugins: [
    "@semantic-release/commit-analyzer",
    [
      "@semantic-release/release-notes-generator",
      {
        changelogContext: {
          host: "https://dev.azure.com/",
          owner: "[AzureOrganization]",
          repository: "[AzureProject]",
          commit: "_git/[AzureRepo]/commit",
          issue: "_workitems/edit"
        }
      }
    ]
  ]
}

I will gladly provide a pull request, if you agree with the need for this.

All the best!

An in-range update of conventional-changelog-jshint is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 0.3.6 of conventional-changelog-jshint was just published.

Branch Build failing 🚨
Dependency conventional-changelog-jshint
Current Version 0.3.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

conventional-changelog-jshint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

[Question]hide commit's link ?

Is it possible to generate changelog without commit's link ?

I tried to set linkReferences to false but it doesn't work ?

any solution ?

thx.

How to add presets to release notes?

Assuming I have this option.

        [
            "@semantic-release/commit-analyzer",
            {
                "preset": "angular",
                "releaseRules": [
                    {
                        "release": "patch",
                        "type": "ci"
                    },
                    {
                        "release": "patch",
                        "type": "docs"
                    },
                    {
                        "release": "patch",
                        "type": "refactor"
                    }
                ]
            }
        ]

When release notes are released, refactor, ci, and docs aren't being shown in our release notes.

An in-range update of conventional-changelog-ember is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 0.3.8 of conventional-changelog-ember was just published.

Branch Build failing 🚨
Dependency conventional-changelog-ember
Current Version 0.3.7
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

conventional-changelog-ember is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

conventional-changelog-conventionalcommits preset not supported

Hi,

release-notes-generator doesn’t seem to handle the conventional-changelog-conventionalcommits preset.

Some context

I struggle to use the conventionalcommits convention on my project.
This convention is used by commitlint to ensure the proper format of our commit messages.

I set up semantic-release with the default angular convention which was fine until now.

I now, not only want feat and fix to appear in the generated changelog, but also all other types defined by the commitlint convention (e.g. chore, perf, refactor…).

The conventional-changelog-conventionalcommits preset can be found in the conventional-changelog repository.

The issue

Release-notes-generator uses a custom preset loader which handle "straightforward" presets like angular, and "promisable" preset like ember.

However it doesn’t support the third type of preset used for the conventionnalcommit. This preset is a function waiting a config object which can be used for customization.

When called by release-notes-generator, the preset receives a callback function instead of a config object.

Conclusion

Why release-notes-generator doesn't rely on the preset-loader ?

That been asked, this preset loader doesn't seem compatible with "promisable" presets.
Am I missing something?

[Need Help] Include/Map all commits to changelog

I have a configuration to set default any commit as patch for our current workflow:

"release": {
    "npmPublish": false,
    "branches": [
      "master"
    ],
    "plugins": [
      [
        "@semantic-release/commit-analyzer",
        {
          "preset": "angular",
          "releaseRules": [
            {
              "scope": "/.skip ci/",
              "release": false
            },
            {
              "type": "/.*/",
              "release": "patch"
            }
          ]
        }
      ],
      [
        "@semantic-release/npm",
        {
          "npmPublish": false
        }
      ],
      [
        "@semantic-release/release-notes-generator",
        {
          "host": "https://url.com",
          "linkReferences": false,
          "linkCompare": false
        }
      ],
      [
        "@semantic-release/changelog",
        {
          "changelogTitle": "Changelog"
        }
      ],
      "@semantic-release/git",
      [
        "@semantic-release/exec",
        {
          "successCmd": "command1.sh"
        }
      ],
      [
        "@semantic-release/exec",
        {
          "successCmd": "command2.sh"
        }
      ]
    ]
  }

This part is working great but the CHANGELOG is being logged as:


## 0.0.11

### Features

* <commit message> hash

## 0.0.10 

## 0.0.9 

I couldn't find if this is configurable and include all commits even if they are chore test docs, is there a way to map this as other or even to bugfixes.

Is there a way to map/add commits to changelog to avoid having them empty

presetConfig not effecting anything

I've got a repo where i test and explore semantic-release plugins before they go into production repos. Recently spent some time trying to change the look of the release-notes generated. I wanted emojis set for some and almost all types visible. Yet this configuration is not overriding the default preset angular.

Unsure if this is a bug or not, however i do not see any other docs informing on how to do this apart from the guide in this repos README.

custom releaseRules from commit analyzer do not result in any notes generated

when using custom releaseRules in commit-analyzer the release notes do not seem to contain related info:

e.g.:

{
  "plugins": [
    ["@semantic-release/commit-analyzer", {
      "releaseRules": [
        {"breaking": true, "release": "major"},
        {"revert": true, "release": "patch"},
        {"type": "build", "release": "patch"},
        {"type": "docs", "release": "patch"},
        {"type": "feat", "release": "minor"},
        {"type": "fix", "release": "patch"},
        {"type": "perf", "release": "patch"},
        {"type": "refactor", "release": "patch"}
      ]
    }],
    "@semantic-release/release-notes-generator",
    "@semantic-release/github",
    "@semantic-release/npm"
  ]
}

real examples:

An in-range update of conventional-changelog-express is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 0.3.6 of conventional-changelog-express was just published.

Branch Build failing 🚨
Dependency conventional-changelog-express
Current Version 0.3.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

conventional-changelog-express is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Custom writerOpts transform

I'm trying to write a custom writerOpts.transform to add Jira project links to our change logs. I've tried forking the conventional-changelog/conventional-changelog-angular preset, updating the transform there, and then including my custom conventional changelog preset like so:

// package.json
"release": {
    "branches": [
      "master"
    ],
    "plugins": [
      "@semantic-release/commit-analyzer",
      [
        "@semantic-release/release-notes-generator",
        {
          "config": "@my-team/conventional-changelog-angular-jira", <<<<  custom-npm-package
        }
      ],
      "@semantic-release/changelog",
      "@semantic-release/git",
      [
        "@semantic-release/exec",
       ]
    ],
    "preset": "angular" <<<<  UPDATE...REMOVE_THIS
  }

I've also tried pulling just the transform function out into its own file and referencing it in the writerOpts field like so:

// package.json
"release": {
    "branches": [
      "master"
    ],
    "plugins": [
      "@semantic-release/commit-analyzer",
      [
        "@semantic-release/release-notes-generator",
        {
          "writerOpts": "./writer-opts.js"
        }
      ],
      "@semantic-release/changelog",
      "@semantic-release/git",
      [
        "@semantic-release/exec",
      ]
    ]
  }
// writer-opts.js
const compareFunc = require('compare-func')

module.exports = {
    transform: (commit, context) => {
        let discard = true
        const issues = []

        commit.notes.forEach((note) => {
            note.title = 'BREAKING CHANGES'
            discard = false
        })

        if (commit.type === 'feat') {
            commit.type = 'Features'
        } else if (commit.type === 'fix') {
            commit.type = 'Bug Fixes'
        } else if (commit.type === 'perf') {
            commit.type = 'Performance Improvements'
        } else if (commit.type === 'revert' || commit.revert) {
            commit.type = 'Reverts'
        } else if (discard) {
            return
        } else if (commit.type === 'docs') {
            commit.type = 'Documentation'
        } else if (commit.type === 'style') {
            commit.type = 'Styles'
        } else if (commit.type === 'refactor') {
            commit.type = 'Code Refactoring'
        } else if (commit.type === 'test') {
            commit.type = 'Tests'
        } else if (commit.type === 'build') {
            commit.type = 'Build System'
        } else if (commit.type === 'ci') {
            commit.type = 'Continuous Integration'
        }

        if (commit.scope === '*') {
            commit.scope = ''
        }

        if (typeof commit.hash === 'string') {
            commit.shortHash = commit.hash.substring(0, 7)
        }

        if (typeof commit.subject === 'string') {
            let url = context.repository
                ? `${context.host}/${context.owner}/${context.repository}`
                : context.repoUrl
            if (url) {
                url = `${url}/issues/`
                // Issue URLs.
                commit.subject = commit.subject.replace(
                    /#([0-9]+)/g,
                    (_, issue) => {
                        issues.push(issue)
                        return `[#${issue}](${url}${issue})`
                    }
                )

                // JIRA Ticket
                commit.subject = commit.subject.replace(
                    /([a-zA-Z]+)-(\d+)/,
                    (match, project, number) => {
                        return `[${match}](https://cadence.atlassian.net/browse/${project}-${number})`
                    }
                )
            }
            if (context.host) {
                // User URLs.
                commit.subject = commit.subject.replace(
                    /\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g,
                    (_, username) => {
                        if (username.includes('/')) {
                            return `@${username}`
                        }

                        return `[@${username}](${context.host}/${username})`
                    }
                )
            }
        }

        // remove references that already appear in the subject
        commit.references = commit.references.filter((reference) => {
            if (issues.indexOf(reference.issue) === -1) {
                return true
            }

            return false
        })

        return commit
    },
    groupBy: 'type',
    commitGroupsSort: 'title',
    commitsSort: ['scope', 'subject'],
    noteGroupsSort: 'title',
    notesSort: compareFunc,
}

Neither of these approaches seem to work. Any thoughts on how best to achieve this would be much appreciated!

UPDATE

For anyone finding this, I got it working after some more experimenting. The custom preset library I made does work but I had to remove "preset": "angular" from my package.json. In case anyone is curious, pointing directly at a file containing the writerOpts.transform method did not work.

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.