mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-09 12:26:33 +00:00
Throw error if no commit is annotated with a changelog entry
Change-type: patch Signed-off-by: Giovanni Garufi <giovanni@balena.io> Changelog-entry: Throw error if no commit is annotated with a changelog entry
This commit is contained in:
parent
759722bf7d
commit
caeb84f58b
@ -31,9 +31,7 @@ module.exports = {
|
|||||||
fromLine: 5
|
fromLine: 5
|
||||||
},
|
},
|
||||||
|
|
||||||
includeCommitWhen: (commit) => {
|
includeCommitWhen: 'has-changelog-entry',
|
||||||
return commit.footer['Changelog-entry']
|
|
||||||
},
|
|
||||||
|
|
||||||
getIncrementLevelFromCommit: (commit) => {
|
getIncrementLevelFromCommit: (commit) => {
|
||||||
if (/none/i.test(commit.footer['Change-type'])) {
|
if (/none/i.test(commit.footer['Change-type'])) {
|
||||||
@ -44,6 +42,9 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
transformTemplateData: (data) => {
|
transformTemplateData: (data) => {
|
||||||
|
if (data.commits.length === 0) {
|
||||||
|
throw new Error('No commits annotated with Changelog-entry')
|
||||||
|
}
|
||||||
data.features = data.commits.filter((commit) => {
|
data.features = data.commits.filter((commit) => {
|
||||||
return commit.subject.type === 'feat'
|
return commit.subject.type === 'feat'
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user