Skip to content
This repository was archived by the owner on Nov 4, 2022. It is now read-only.

Commit b445566

Browse files
author
protoEvangelion
committed
fix(pull-request): release 'If use_editor setting is false don't open the editor'
1 parent 3ce2980 commit b445566

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/cmds/pull-request/submit.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,19 @@ export async function submit(options, user) {
2323
}
2424

2525
if (userLeftMsgEmpty(title)) {
26-
title = useEditor ?
27-
openFileInEditor('temp-gh-pr-title.txt', `# Add a pr title message on the next line\n`)
26+
title = useEditor
27+
? openFileInEditor(
28+
'temp-gh-pr-title.txt',
29+
`# Add a pr title message on the next line\n`
30+
)
2831
: git.getLastCommitMessage(pullBranch)
2932
}
3033

31-
// If user passes an empty title and description, --description will get merged into options.title
32-
// Need to reference the original title not the potentially modified one
34+
/*
35+
* If user passes an empty title and description, --description will get merged into options.title
36+
* Need to reference the original title not the potentially modified one
37+
* Also check if user wants to user their editor to add a description
38+
*/
3339
if (useEditor && (userLeftMsgEmpty(options.title) || userLeftMsgEmpty(description))) {
3440
description = openFileInEditor(
3541
'temp-gh-pr-body.md',

0 commit comments

Comments
 (0)