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

Question: configuration for custom settings commit-analyzer settings #165

Closed
pheenomenon opened this issue Jan 22, 2020 · 15 comments
Closed
Labels

Comments

@pheenomenon
Copy link

pheenomenon commented Jan 22, 2020

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: 'user@domain.com', date: 2020-01-22T23:58:46.000Z }, committer: { name: 'GitHub Enterprise', email: 'noreply@domain.com', 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: 'user@domain.com', date: 2020-01-22T23:42:50.000Z }, committer: { name: 'GitHub Enterprise', email: 'noreply@domain.com', 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: 'user@domain.com', date: 2020-01-22T23:39:24.000Z }, committer: { name: 'GitHub Enterprise', email: 'noreply@domain.com', 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: 'user@domain.com', date: 2020-01-22T23:31:01.000Z }, committer: { name: 'GitHub Enterprise', email: 'noreply@domain.com', 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: 'user@domain.com', date: 2020-01-22T23:13:04.000Z }, committer: { name: 'GitHub Enterprise', email: 'noreply@domain.com', 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: 'user@domain.com', date: 2020-01-22T23:03:50.000Z }, committer: { name: 'GitHub Enterprise', email: 'noreply@domain.com', 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: 'user@domain.com', date: 2020-01-22T22:51:55.000Z }, committer: { name: 'GitHub Enterprise', email: 'noreply@domain.com', 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

@pvdlg
Copy link
Member

pvdlg commented Jan 23, 2020

You use the preset eslint for @@semantic-release/commit-analyzer and conventionalcommits for @semantic-release/release-notes-generator which doesn't make sense. You have to use the same preset for both.

If you format your commits with the eslint format won't find any commit to add to the release note because it would look for commits formatted with conventionalcommits format.

@pvdlg pvdlg closed this as completed Jan 23, 2020
@pvdlg pvdlg added the support label Jan 23, 2020
@pheenomenon
Copy link
Author

pheenomenon commented Jan 23, 2020

Thanks @pvdlg , yes just realized it and changed to below:

{
  "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": "eslint",
      "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
          }
        ]
      }
    }]
  ]
}

Noticed following from the logs:
1- semantic-release/release-notes-generator still did not seem to pick the commits. Was hoping the Tag: New & Breaking to be picked up. Then there is glob, but not sure if semantic-release/release-notes-generator also uses micromatch ?
2- semantic-release/npm was never triggered after semantic-release/release-notes-generator - Do we need to explicitly define the dependencies in package.json for all 4 ? Trying that now.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 963 packages from 1525 contributors and audited 14125 packages in 11.078s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
[12:16:50 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 } +3ms
  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:16:50 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 } +2ms
[12:16:50 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 ] }, { gitTag: 'v7.2.0', version: '7.2.0', channels: [ null ] } ] +0ms
[12:16:51 AM] [semantic-release] › ✔  Run automated release from branch master
[12:16:51 AM] [semantic-release] › ✔  Allowed to push to the Git repository
[12:16:51 AM] [semantic-release] › ℹ  Found git tag v7.2.0 associated with version 7.2.0 on branch master
  semantic-release:get-commits Use from: e1352949b238c890633f05b2140f538adc5e7360 +0ms
[12:16:51 AM] [semantic-release] › ℹ  Found 2 commits since last release
  semantic-release:get-commits Parsed commits: [ { commit: { long: '9ecc99fc8d2dffd2e899abac684a26e2007150f1', short: '9ecc99f' }, tree: { long: 'edb70ec5c542b15f5913c917204a6e412880ab9f', short: 'edb70ec' }, author: { name: 'user', email: 'user@domain.com', date: 2020-01-23T00:14:14.000Z }, committer: { name: 'GitHub Enterprise', email: 'noreply@domain.com', date: 2020-01-23T00:14:14.000Z }, subject: 'Feature57 (#66)', body: '* release notes 7\r\n\r\n* release notes 8\r\n\r\n* release notes 9\r\n', hash: '9ecc99fc8d2dffd2e899abac684a26e2007150f1', committerDate: 2020-01-23T00:14:14.000Z, message: 'Feature57 (#66)\n\n* release notes 7\r' + '\n\r' + '\n* release notes 8\r' + '\n\r' + '\n* release notes 9', gitTags: '(HEAD -> master, origin/master, origin/HEAD)' }, { commit: { long: '49e8991f9bbaa8002b4e706439e8a632f7407baa', short: '49e8991' }, tree: { long: 'edb70ec5c542b15f5913c917204a6e412880ab9f', short: 'edb70ec' }, author: { name: 'newcid', email: 'newcid@domain.com', date: 2020-01-23T00:13:45.000Z }, committer: { name: 'user', email: 'user@domain.com', date: 2020-01-23T00:13:45.000Z }, subject: 'no-release: badge in README.md to 7.2.0 (#65)', body: '', hash: '49e8991f9bbaa8002b4e706439e8a632f7407baa', committerDate: 2020-01-23T00:13:45.000Z, message: 'no-release: badge in README.md to 7.2.0 (#65)', gitTags: '' } ] +13ms
[12:16:51 AM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[12:16:51 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: Feature57 (#66)

* release notes 7



* release notes 8



* release notes 9
  semantic-release:commit-analyzer Analyzing with custom rules +0ms
  semantic-release:commit-analyzer The rule { subject: '!no-release:*', release: 'patch' } match commit with release type 'patch' +0ms
[12:16:51 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[12:16:51 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: no-release: badge in README.md to 7.2.0 (#65)
  semantic-release:commit-analyzer Analyzing with custom rules +9ms
  semantic-release:commit-analyzer Analyzing with default rules +0ms
[12:16:51 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[12:16:51 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 2 commits complete: patch release
[12:16:51 AM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[12:16:51 AM] [semantic-release] › ℹ  The next release version is 7.2.1
[12:16:51 AM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
  semantic-release:release-notes-generator version: '7.2.1' +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.2.0' +0ms
  semantic-release:release-notes-generator currentTag: 'v7.2.1' +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:16:51 AM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[12:16:57 AM] [semantic-release] › ✔  Created tag v7.2.1
[12:16:57 AM] [semantic-release] › ✔  Published release 7.2.1 on default channel

@pvdlg
Copy link
Member

pvdlg commented Jan 23, 2020

The types property is not supported in the eslint preset. Only the conventionalcommits preset supports it. Please refer to the presets docs in https://github.com/conventional-changelog/conventional-changelog

@pheenomenon
Copy link
Author

Thanks @pvdlg
changed the .releaserc to below and got all 4 plugins to work now.
Looks like I need to find the right way to configure release-notes-generator for eslint presetConfig matching our releaseRules config for commit-analyzer. Good to know that its possible. Will dig thru https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-eslint to find the correct presetConfig

{
  "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": "eslint",
      "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
          }
        ]
      }
    }],
    ["@semantic-release/npm"],
    ["@semantic-release/github"]
  ]
}

@pheenomenon
Copy link
Author

@pvdlg thank you once more for pointing in the right direction. Removed "types" and release-notes-generator picked up New & Breaking. Made changes to .releaserc to match the "subject": "!no-release:*" . Trying it out now.

{
  "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": "eslint",
      "presetConfig": [
          {
            "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
          },
          {
            "subject": "!no-release:*",
            "section": ":memo: Bug-Fix",
            "hidden": false
          }
      ]
    }],
    ["@semantic-release/npm"],
    ["@semantic-release/github"]
  ]
}

@pheenomenon
Copy link
Author

pheenomenon commented Jan 23, 2020

:) that did not work, semantic-release/release-notes-generator did not like"subject": "!no-release:*". Will look thru https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-eslint

@pheenomenon
Copy link
Author

I think

const parsedCommits = filter(
is where the commits are selected to be passed to the return at
return getStream(intoStream.object(parsedCommits).pipe(writer(changelogContext, writerOpts)));

So the code doing the matching could inside here?:

const parser = require('conventional-commits-parser').sync;

Hopefully this is the right direction... digging in

@pheenomenon
Copy link
Author

Okay, reading thru https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-commits-parser/index.js
I see regex so tried "subject": "*" below, but did not work. Will dig some more.

["@semantic-release/release-notes-generator", {
      "preset": "eslint",
      "presetConfig": [
          {
            "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
          },
          {
            "subject": "*",
            "section": ":memo: Bug-Fix",
            "hidden": false
          }
      ]
    }]

@pheenomenon
Copy link
Author

Only thing am struggling with is to include the commits without any tag as part of the generated release note. Read thru https://github.com/conventional-changelog/conventional-changelog/blob/526b28214d12c55158eb2e4d44408378587ceb97/packages/conventional-commits-parser/lib/parser.js#L18
It seems regex should do the trick. but no luck so far with the below 3. will give it a go tomorrow.

{
            "subject": "(?s).*",
            "section": ":memo: Bug-Fix",
            "hidden": false
          }
{
            "subject": ".*",
            "section": ":memo: Bug-Fix",
            "hidden": false
          }
{
            "subject": "[\\s\\S]*",
            "section": ":memo: Bug-Fix",
            "hidden": false
          }

@pvdlg
Copy link
Member

pvdlg commented Jan 23, 2020

The presetConfig must be an object but you set it as an array. This object is passed directly to the conventional-changelog preset. It seems you are trying to use the preset options section and hidden but those are not supported by the eslint preset.

@pheenomenon
Copy link
Author

pheenomenon commented Jan 23, 2020

@pvdlg wonder how you figured that presetConfig must be an object & not an array . Is there a code or doc or usage-snippet you could point me to? I see its used here - https://github.com/semantic-release/release-notes-generator/blob/master/lib/load-changelog-config.js#L32 but not seeing a reference in: https://github.com/conventional-changelog/conventional-changelog/blob/526b28214d12c55158eb2e4d44408378587ceb97/packages/conventional-changelog-eslint/index.js

@pheenomenon
Copy link
Author

In further debugging this scenario changed .releaserc.json to release.config.js as below:

module.exports = {
  branch: 'master',
  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": "eslint"
    }],
    ["@semantic-release/npm"],
    ["@semantic-release/github"]
  ],
  generateNotes: {
    preset: 'eslint',
    writerOpts: {
      
        transform: (commit) => {
          console.log(`commit is $$ 1: ${commit}`)
          if (!commit.tag || typeof commit.tag !== 'string') {
            return
          }
          console.log(`commit is $$ 2: ${commit}`)
    
          commit.shortHash = commit.hash.substring(0, 7)
    
          return commit
        },
        groupBy: 'tag',
        commitGroupsSort: 'title',
        commitsSort: ['tag', 'message']
      }
  },
};

But the writerOpts -> transform is never invoked, logs below:

npx: installed 872 in 14.335s
[3:44:06 AM] [semantic-release] › ℹ  Running semantic-release version 16.0.3
  semantic-release:config load config from: /home/circleci/project/release.config.js +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/npm' ],
  semantic-release:config     [ '@semantic-release/github' ]
  semantic-release:config   ],
  semantic-release:config   branch: 'master',
  semantic-release:config   generateNotes: {
  semantic-release:config     preset: 'eslint',
  semantic-release:config     writerOpts: {
  semantic-release:config       transform: [Function: transform],
  semantic-release:config       groupBy: 'tag',
  semantic-release:config       commitGroupsSort: 'title',
  semantic-release:config       commitsSort: [Array]
  semantic-release:config     }
  semantic-release:config   },
  semantic-release:config   _: [],
  semantic-release:config   debug: true,
  semantic-release:config   '$0': '../.npm/_npx/113/bin/semantic-release'
  semantic-release:config } +4ms
  semantic-release:plugins options for @semantic-release/npm/verifyConditions: {} +0ms
[3:44:06 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/npm"
  semantic-release:plugins options for @semantic-release/github/verifyConditions: {} +2ms
[3:44:06 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
  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
[3:44:06 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: 'eslint',
  semantic-release:plugins   writerOpts: {
  semantic-release:plugins     transform: [Function: transform],
  semantic-release:plugins     groupBy: 'tag',
  semantic-release:plugins     commitGroupsSort: 'title',
  semantic-release:plugins     commitsSort: [ 'tag', 'message' ]
  semantic-release:plugins   }
  semantic-release:plugins } +1ms
[3:44:06 AM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
  semantic-release:plugins options for @semantic-release/npm/prepare: {} +0ms
[3:44:06 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/npm"
  semantic-release:plugins options for @semantic-release/npm/publish: {} +1ms
[3:44:06 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/npm"
  semantic-release:plugins options for @semantic-release/github/publish: {} +0ms
[3:44:06 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/github"
  semantic-release:plugins options for @semantic-release/npm/addChannel: {} +0ms
[3:44:06 AM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/npm"
  semantic-release:plugins options for @semantic-release/github/addChannel: {} +1ms
[3:44:06 AM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
  semantic-release:plugins options for @semantic-release/github/success: {} +0ms
[3:44:06 AM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
  semantic-release:plugins options for @semantic-release/github/fail: {} +0ms
[3:44:06 AM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
  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: 'v10.0.0', version: '10.0.0', channels: [ null ] }, { gitTag: 'v10.1.0', version: '10.1.0', channels: [ null ] }, { gitTag: 'v10.2.0', version: '10.2.0', channels: [ null ] }, { gitTag: 'v10.3.0', version: '10.3.0', channels: [ null ] }, { gitTag: 'v10.4.0', version: '10.4.0', channels: [ null ] }, { gitTag: 'v10.5.0', version: '10.5.0', channels: [ null ] }, { gitTag: 'v10.6.0', version: '10.6.0', channels: [ null ] }, { gitTag: 'v10.7.0', version: '10.7.0', channels: [ null ] }, { gitTag: 'v10.8.0', version: '10.8.0', channels: [ null ] }, { gitTag: 'v11.0.0', version: '11.0.0', channels: [ null ] }, { gitTag: 'v11.0.1', version: '11.0.1', channels: [ null ] }, { gitTag: 'v11.0.2', version: '11.0.2', channels: [ null ] }, { gitTag: 'v11.1.0', version: '11.1.0', channels: [ null ] }, { gitTag: 'v11.1.1', version: '11.1.1', channels: [ null ] }, { gitTag: 'v12.0.0', version: '12.0.0', channels: [ null ] }, { gitTag: 'v12.1.0', version: '12.1.0', channels: [ null ] }, { gitTag: 'v12.2.0', version: '12.2.0', 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 ] }, { gitTag: 'v7.2.0', version: '7.2.0', channels: [ null ] }, { gitTag: 'v7.2.1', version: '7.2.1', channels: [ null ] }, { gitTag: 'v8.0.0', version: '8.0.0', channels: [ null ] }, { gitTag: 'v8.1.0', version: '8.1.0', channels: [ null ] }, { gitTag: 'v8.1.1', version: '8.1.1', channels: [ null ] }, { gitTag: 'v9.0.0', version: '9.0.0', channels: [ null ] }, { gitTag: 'v9.0.1', version: '9.0.1', channels: [ null ] }, { gitTag: 'v9.0.2', version: '9.0.2', channels: [ null ] }, { gitTag: 'v9.0.3', version: '9.0.3', channels: [ null ] }, { gitTag: 'v9.0.4', version: '9.0.4', channels: [ null ] }, { gitTag: 'v9.0.5', version: '9.0.5', channels: [ null ] } ] +0ms
[3:44:08 AM] [semantic-release] › ✔  Run automated release from branch master
[3:44:08 AM] [semantic-release] › ✔  Allowed to push to the Git repository
[3:44:08 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/npm"
[3:44:08 AM] [semantic-release] [@semantic-release/npm] › ℹ  Verify authentication for registry https://artifactory.corp.domain.com:443/artifactory/api/npm/npm-new-release-local/
[3:44:08 AM] [semantic-release] [@semantic-release/npm] › ℹ  Reading npm config from /home/circleci/.npmrc
[3:44:08 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/npm"
[3:44:08 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/github"
[3:44:08 AM] [semantic-release] [@semantic-release/github] › ℹ  Verify GitHub authentication (https://git.corp.domain.com/api/v3)
[3:44:08 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/github"
[3:44:08 AM] [semantic-release] › ℹ  Found git tag v12.2.0 associated with version 12.2.0 on branch master
  semantic-release:get-commits Use from: 3e25c7c0d2d06c26b13051957dd991990f255c59 +0ms
[3:44:08 AM] [semantic-release] › ℹ  Found 2 commits since last release
  semantic-release:get-commits Parsed commits: [ { commit: { long: '1d37e3d50f9d8ebe17d93acb70edbc7e3976a674', short: '1d37e3d' }, tree: { long: 'e4aa6e5f628bbfc33ef8b60e8e7ee333fb393d32', short: 'e4aa6e5' }, author: { name: 'user', email: 'user@domain.com', date: 2020-01-27T03:40:41.000Z }, committer: { name: 'GitHub Enterprise', email: 'noreply@domain.com', date: 2020-01-27T03:40:41.000Z }, subject: 'New: configjs 3 (#125)', body: '', hash: '1d37e3d50f9d8ebe17d93acb70edbc7e3976a674', committerDate: 2020-01-27T03:40:41.000Z, message: 'New: configjs 3 (#125)', gitTags: '(HEAD -> master, origin/master, origin/HEAD)' }, { commit: { long: '8fb149e68b12ab2e6de3fb65284153bfae4f5129', short: '8fb149e' }, tree: { long: 'af4bfd96366465d1a196898fe758868210b3c0a7', short: 'af4bfd9' }, author: { name: 'newcid', email: 'newcid@domain.com', date: 2020-01-27T03:38:08.000Z }, committer: { name: 'user', email: 'user@domain.com', date: 2020-01-27T03:38:08.000Z }, subject: 'no-release: badge in README.md to 12.2.0 (#124)', body: '', hash: '8fb149e68b12ab2e6de3fb65284153bfae4f5129', committerDate: 2020-01-27T03:38:08.000Z, message: 'no-release: badge in README.md to 12.2.0 (#124)', gitTags: '' } ] +11ms
[3:44:08 AM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[3:44:08 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: New: configjs 3 (#125)
  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
[3:44:08 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is minor
[3:44:08 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: no-release: badge in README.md to 12.2.0 (#124)
  semantic-release:commit-analyzer Analyzing with custom rules +9ms
  semantic-release:commit-analyzer Analyzing with default rules +0ms
[3:44:08 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[3:44:08 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 2 commits complete: minor release
[3:44:08 AM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[3:44:08 AM] [semantic-release] › ℹ  The next release version is 12.3.0
[3:44:08 AM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
  semantic-release:release-notes-generator version: '12.3.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: 'v12.2.0' +0ms
  semantic-release:release-notes-generator currentTag: 'v12.3.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
commit is $$ 1: [object Object]
commit is $$ 2: [object Object]
commit is $$ 1: [object Object]
[3:44:08 AM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[3:44:08 AM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/npm"
[3:44:08 AM] [semantic-release] [@semantic-release/npm] › ℹ  Write version 12.3.0 to package.json in /home/circleci/project
v12.3.0
[3:44:08 AM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/npm"
[3:44:13 AM] [semantic-release] › ✔  Created tag v12.3.0
[3:44:13 AM] [semantic-release] › ℹ  Start step "publish" of plugin "@semantic-release/npm"
[3:44:13 AM] [semantic-release] [@semantic-release/npm] › ℹ  Publishing version 12.3.0 to npm registry on dist-tag latest
npm notice 
npm notice 📦  @new/dummy-cci-release@12.3.0
npm notice === Tarball Contents === 
npm notice 602B   package.json          
npm notice 278B   README.md             
npm notice 1.4kB  release.config.js     
npm notice 11.6kB .circleci/config.yml  
npm notice 177B   src/avenger-names.json
npm notice 174B   src/index.js          
npm notice 385B   src/index.test.js     
npm notice === Tarball Details === 
npm notice name:          @new/dummy-cci-release                  
npm notice version:       12.3.0                                  
npm notice package size:  4.5 kB                                  
npm notice unpacked size: 14.7 kB                                 
npm notice shasum:        196b2a31abaceed618b4b6491f430ddf5c1452f9
npm notice integrity:     sha512-0mPHKpocEKaVT[...]W1f26E/cbqi9g==
npm notice total files:   7                                       
npm notice 
+ @new/dummy-cci-release@12.3.0
[3:44:14 AM] [semantic-release] [@semantic-release/npm] › ℹ  Published @new/dummy-cci-release@12.3.0 to dist-tag @latest on https://artifactory.corp.domain.com:443/artifactory/api/npm/npm-new-release-local/
[3:44:14 AM] [semantic-release] › ✔  Completed step "publish" of plugin "@semantic-release/npm"
[3:44:14 AM] [semantic-release] › ℹ  Start step "publish" of plugin "@semantic-release/github"
  semantic-release:github release object: {
  semantic-release:github   owner: 'new',
  semantic-release:github   repo: 'dummy-cci-release',
  semantic-release:github   tag_name: 'v12.3.0',
  semantic-release:github   name: 'v12.3.0',
  semantic-release:github   body: '# ' +
  semantic-release:github     '[12.3.0](https://git.corp.domain.com/new/dummy-cci-release/compare/v12.2.0...v12.3.0) ' +
  semantic-release:github     '(2020-01-27)\n\n\n### New\n\n* configjs 3 (#125) ' +
  semantic-release:github     '([1d37e3d](https://git.corp.domain.com/new/dummy-cci-release/commit/1d37e3d50f9d8ebe17d93acb70edbc7e3976a674)), ' +
  semantic-release:github     'closes ' +
  semantic-release:github     '[#125](https://git.corp.domain.com/new/dummy-cci-release/issues/125)\n' +
  semantic-release:github     '\n\n\n',
  semantic-release:github   prerelease: false
  semantic-release:github } +0ms
[3:44:14 AM] [semantic-release] [@semantic-release/github] › ℹ  Published GitHub release: https://git.corp.domain.com/new/dummy-cci-release/releases/tag/v12.3.0
[3:44:14 AM] [semantic-release] › ✔  Completed step "publish" of plugin "@semantic-release/github"
[3:44:14 AM] [semantic-release] › ℹ  Start step "success" of plugin "@semantic-release/github"
  semantic-release:github found pull requests: [ 124, 125 ] +0ms
  semantic-release:github found issues via comments: [] +6ms
  semantic-release:github create comment: {
  semantic-release:github   owner: 'new',
  semantic-release:github   repo: 'dummy-cci-release',
  semantic-release:github   issue_number: 124,
  semantic-release:github   body: ':tada: This PR is included in version 12.3.0 :tada:\n\nThe ' +
  semantic-release:github     'release is available on:\n- `npm package (@latest dist-tag)`\n- ' +
  semantic-release:github     '[GitHub ' +
  semantic-release:github     'release](https://git.corp.domain.com/new/dummy-cci-release/releases/tag/v12.3.0)\n' +
  semantic-release:github     '\nYour ' +
  semantic-release:github     '**[semantic-release](https://github.com/semantic-release/semantic-release)** ' +
  semantic-release:github     'bot :package::rocket:'
  semantic-release:github } +1ms
  semantic-release:github create comment: {
  semantic-release:github   owner: 'new',
  semantic-release:github   repo: 'dummy-cci-release',
  semantic-release:github   issue_number: 125,
  semantic-release:github   body: ':tada: This PR is included in version 12.3.0 :tada:\n\nThe ' +
  semantic-release:github     'release is available on:\n- `npm package (@latest dist-tag)`\n- ' +
  semantic-release:github     '[GitHub ' +
  semantic-release:github     'release](https://git.corp.domain.com/new/dummy-cci-release/releases/tag/v12.3.0)\n' +
  semantic-release:github     '\nYour ' +
  semantic-release:github     '**[semantic-release](https://github.com/semantic-release/semantic-release)** ' +
  semantic-release:github     'bot :package::rocket:'
  semantic-release:github } +0ms
[3:44:19 AM] [semantic-release] [@semantic-release/github] › ℹ  Added comment to issue #124: https://git.corp.domain.com/new/dummy-cci-release/pull/124#issuecomment-2164228
[3:44:22 AM] [semantic-release] [@semantic-release/github] › ℹ  Added comment to issue #125: https://git.corp.domain.com/new/dummy-cci-release/pull/125#issuecomment-2164229
[3:44:25 AM] [semantic-release] [@semantic-release/github] › ℹ  Added labels [ 'released' ] to issue #124
[3:44:28 AM] [semantic-release] [@semantic-release/github] › ℹ  Added labels [ 'released' ] to issue #125
  semantic-release:github found semantic-release issues: [] +9s
[3:44:28 AM] [semantic-release] › ✔  Completed step "success" of plugin "@semantic-release/github"
[3:44:28 AM] [semantic-release] › ✔  Published release 12.3.0 on default channel

@pvdlg
Copy link
Member

pvdlg commented Jan 27, 2020

Configuring generateNotes is the old way of configuring plugins. The new way is to use plugins. You config in plugin override others config:

    ["@semantic-release/release-notes-generator", {
      "preset": "eslint"
    }],

Just use only plugins to configure.

@pheenomenon
Copy link
Author

okay, that's good to know. will revert to using plugins.
FYI: One more thing I noticed- on trying to use conventionalcommits instead of eslint but the semantic-release/commit-analyzer -> "subject": "!no-release:*", do not like it as much.

{
  "plugins": [
    ["@semantic-release/commit-analyzer", {
      "preset": "conventionalcommits",
      "releaseRules": [
        {
          "type": "Breaking",
          "release": "major"
        },
        {
          "type": "breaking",
          "release": "major"
        },
        {
          "type": "New",
          "release": "minor"
        },
        {
          "type": "new",
            "release": "minor"
          },
          {
            "subject": "no-release:",
            "message": "no-release:",
            "release": false
          },
          {
            "subject": "!no-release:*",
            "message": "!no-release:*",
            "release": "patch"
          }
        ],
      "parserOpts": {
        "noteKeywords": [
          "BREAKING CHANGE",
          "BREAKING CHANGES"
        ]
      }
    }],
    ["@semantic-release/release-notes-generator", {
      "preset": "conventionalcommits",
      "presetConfig": {
          "types": [
            {"type": "breaking", "section": "Breaking", "hidden": false},
            {"type": "new", "section": "New", "hidden": false},
            {"subject": ".*", "section": "Bug Fixes", "hidden": false}
            {"message": ".*", "section": "Bug Fixes", "hidden": false}
          ]
        }
      }],
    ["@semantic-release/npm"],
    ["@semantic-release/github"]
  ]
}

@alexey-sh
Copy link

@pheenomenon have you fixed your issue?

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

No branches or pull requests

3 participants