Skip to content

Commit 28f1907

Browse files
Merge pull request #140 from vishwanatharondekar/description-as-option
feat: description as option
2 parents 70fb46b + bfd9bd1 commit 28f1907

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

index.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,10 +539,12 @@ function createMergeRequest(options) {
539539
})
540540
.then(function(userMessage) {
541541
var title = userMessage.split('\n')[0]
542-
var description = userMessage
543-
.split('\n')
544-
.slice(2)
545-
.join(' \n')
542+
var description =
543+
options.description ||
544+
userMessage
545+
.split('\n')
546+
.slice(2)
547+
.join(' \n')
546548

547549
logger.log('Merge request title : ' + title.green)
548550
if (description)
@@ -655,6 +657,7 @@ program
655657
.option('-b, --base [optional]', 'Base branch name')
656658
.option('-t, --target [optional]', 'Target branch name')
657659
.option('-m, --message [optional]', 'Title of the merge request')
660+
.option('-d, --description [optional]', 'Description for the merge request')
658661
.option('-a, --assignee [optional]', 'User to assign merge request to')
659662
.option(
660663
'-l, --labels [optional]',

0 commit comments

Comments
 (0)