semantic-release / release-notes-generator Goto Github PK
View Code? Open in Web Editor NEW:clipboard: semantic-release plugin to generate changelog content with conventional-changelog
License: MIT License
:clipboard: semantic-release plugin to generate changelog content with conventional-changelog
License: MIT License
☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.
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.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.
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.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
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"
}
]
}
]
]
}
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
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/release.yml
actions/checkout v4.1.4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
.github/workflows/test.yml
actions/checkout v4.1.4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
actions/checkout v4.1.4@0ad4b8fadaa221de15dcec353f45205ec38ea70b
actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
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.7.0
.nvmrc
node 20
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.
☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.
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.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
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.
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
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!
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
.
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
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:
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.
Hi,
release-notes-generator doesn’t seem to handle the conventional-changelog-conventionalcommits preset.
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.
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.
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?
@semantic-release/release-notes-generator
sr-release-notes-generator
package and point it to @semantic-release/release-notes-generator
semantic-release
semantic-release/semantic-release#435follow up for #12
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:
Any desire for something like that to be built into this plugin?
This commit resulted in release notes that stated that the release closed the linked issue, when really it was just intended as reference. Have we considered doing keyword-matching on the preceding word like GitHub does in issue text?
We are currently testing in Node 8 and 10:
release-notes-generator/.travis.yml
Lines 2 to 4 in 44abdf9
We want to test in 8.3 explicitly as it is currently the minimal Node version supported by semantic-release. And we want to start testing in Node 12 as it is the latest stable version.
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
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.
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.
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?
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)
☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.
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.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Love the grouping by type, inclusion of the title and hash.
Was wondering if there's another preset that also includes the contributor?
If there isn't, is there a good starting point for potentially creating one?
Something similar to this: https://github.com/facebook/create-react-app/releases
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.
path
to plugin config defined as a Function or an Array (f93eeb7)generateNotes
plugins (5989989)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
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
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.
I just want to use the notes generator part of the ecosystem - is there a way to do this without using all the semantic-release pipeline?
Is it worth putting this into the readme?
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.
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)
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)?
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
documentation could be adjusted to inform that given keywords must appear at the beginning of the comment line
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}"
}]
]
}```
☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.
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.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
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.
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}),
}));
☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.
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.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
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.
The new version differs by 1 commits.
e882096
fix(package): update get-stream to version 4.0.0
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
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.
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.
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?
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.
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.
@semantic-release/gitlab
and @semantic-release/changelog
"repository": {
"type": "git",
"url": "git+ssh://[email protected]:2222/MY-GROUP/my-repo.git"
},
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>
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>
☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.
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.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
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 💪
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot 🌴
https://github.com/semantic-release/release-notes-generator#install
It should be
npm install @semantic-release/release-notes-generator -D
☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.
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.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Part of semantic-release/semantic-release#1692
.travis.yml
.github/workflows/{test,release}.yml
(copy from https://github.com/semantic-release/npm/tree/master/.github/workflows)package-lock.json
from .gitignore
.npmrc
and .yarnrc
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)
package-json.lock
test:ci
script which doesn't run lint
pre script
renovate config
"renovate": {
"extends": [
"github>semantic-release/.github"
]
}
codecov
and remove it from scriptsWould it be possible to use release-notes-generator only in a github project, and use it to auto-complete a draft release changelog ?
This relates to this SO question
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.