Skip to content

Commit 024bc3a

Browse files
authored
Merge pull request #47 from JayDonigian/jd-bugfix-interactive-mode-with-detected-issue-num_47
2 parents 79e116a + 10835b1 commit 024bc3a

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

git-open-pull.go

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,19 @@ func GetIssueNumber(ctx context.Context, client *github.Client, settings *Settin
5959
return strconv.Atoi(n)
6060
}
6161
}
62-
n, err := input.Ask(fmt.Sprintf("issue number [%d]", detected), "")
63-
if err != nil {
64-
log.Fatal(err)
65-
}
66-
if n == "" {
67-
return detected, nil
62+
63+
if interactive {
64+
n, err := input.Ask(fmt.Sprintf("issue number [%d]", detected), "")
65+
if err != nil {
66+
log.Fatal(err)
67+
}
68+
if n == "" {
69+
return detected, nil
70+
}
71+
return strconv.Atoi(n)
6872
}
69-
return strconv.Atoi(n)
73+
74+
return detected, nil
7075
}
7176

7277
func main() {

0 commit comments

Comments
 (0)