Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
fix: πŸ› add config option to change closed issue message (streamich#218)
Browse files Browse the repository at this point in the history
Allow the ability to modify closed issues message for use cases where
you don't want to close the issues.

βœ… Closes: streamich#215

Co-authored-by: Danilo Alonso <danilo@alonso.network>
  • Loading branch information
damusix and damusix authored Nov 18, 2020
1 parent a3ffb9a commit dd88ce9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const questions = [

module.exports = {
breakingChangePrefix: '🧨 ',
closedIssueMessage: 'Closes: ',
closedIssuePrefix: 'βœ… ',
list,
maxMessageLength: 64,
Expand Down
2 changes: 1 addition & 1 deletion lib/formatCommitMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const formatCommitMessage = (state) => {
if (issues) {
const closedIssueEmoji = config.disableEmoji ? '' : config.closedIssuePrefix;

msg += '\n\n' + closedIssueEmoji + 'Closes: ' + issues;
msg += '\n\n' + closedIssueEmoji + config.closedIssueMessage + issues;
}

return msg;
Expand Down
1 change: 1 addition & 0 deletions test/formatCommitMessage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const defaultConfig = {
disableEmoji: false,
breakingChangePrefix: '🧨 ',
closedIssuePrefix: 'βœ… ',
closedIssueMessage: 'Closes: ',
commitMessageFormat: '<type><(scope)>: <emoji><subject>',
list: [
'test',
Expand Down

0 comments on commit dd88ce9

Please sign in to comment.