@lmc-eu/conventional-changelog-lmc-bitbucket
Advanced tools
Comparing version 1.3.4 to 1.3.5
{ | ||
"name": "@lmc-eu/conventional-changelog-lmc-bitbucket", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"description": "conventional-changelog LMC preset for BitBucket", | ||
@@ -51,3 +51,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "5effef42797b7d6fabab9e54b3a715c276e79e2f" | ||
"gitHead": "0a3432594016ce792c0e486f9a8a4d7cd19443a7" | ||
} |
@@ -6,2 +6,17 @@ const compareFunc = require('compare-func'); | ||
/** | ||
* Formats issues using the issueURL as the prefix of the complete issue URL | ||
* @param {string} issueUrl - if the issueURL is falsy, then the issue will be printed as-is. | ||
* Otherwise, it will be printed as a link | ||
* @param {string} issue - the issue reference (without the # in-front of it) | ||
* @return {string} - Either the issue or a Markdown-formatted link to the issue. | ||
*/ | ||
function formatIssue(issueUrl, issue) { | ||
if (issueUrl) { | ||
return `[#${issue}](${issueUrl}/${issue})`; | ||
} | ||
return `#${issue}`; | ||
} | ||
const parserOpts = { | ||
@@ -20,3 +35,4 @@ headerPattern: /^(?:Pull request #[0-9]+: )?(?:([a-zA-Z]*-[0-9_]*)(?: ))* ?([\w ]*)(?:\((.*)\))?: (.*)$/, | ||
commit.notes.forEach(function (note) { | ||
commit.notes.forEach((note) => { | ||
// eslint-disable-next-line no-param-reassign | ||
note.title = 'BREAKING CHANGES'; | ||
@@ -64,2 +80,3 @@ discard = false; | ||
if (typeof context.host === 'string') { | ||
// eslint-disable-next-line no-param-reassign, prefer-destructuring | ||
context.host = context.host.match(/(^https?:\/\/[a-z.-]*)/)[0]; | ||
@@ -72,3 +89,3 @@ } | ||
if (typeof transformedCommit.subject === 'string') { | ||
transformedCommit.subject = transformedCommit.subject.replace(/#([a-zA-Z0-9\-]+)/g, function (_, issue) { | ||
transformedCommit.subject = transformedCommit.subject.replace(/#([a-zA-Z0-9-]+)/g, (_, issue) => { | ||
issues.push(issue); | ||
@@ -92,2 +109,3 @@ | ||
// eslint-disable-next-line consistent-return | ||
return transformedCommit; | ||
@@ -118,15 +136,1 @@ }, | ||
}); | ||
/** | ||
* Formats issues using the issueURL as the prefix of the complete issue URL | ||
* @param {string} issueUrl - if the issueURL is falsy, then the issue will be printed as-is. Otherwise, it will be printed as a link | ||
* @param {string} issue - the issue reference (without the # in-front of it) | ||
* @return {string} - Either the issue or a Markdown-formatted link to the issue. | ||
*/ | ||
function formatIssue(issueUrl, issue) { | ||
if (issueUrl) { | ||
return '[#' + issue + '](' + issueUrl + '/' + issue + ')'; | ||
} else { | ||
return '#' + issue; | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9670
112
1