Use PR if given
This commit is contained in:
parent
1ea38af79c
commit
4b2f14d939
1 changed files with 6 additions and 2 deletions
|
|
@ -451,12 +451,16 @@ func prMerge(cmd *cobra.Command, args []string) error {
|
|||
return err
|
||||
}
|
||||
} else {
|
||||
_, branchWithOwner, err := prSelectorForCurrentBranch(ctx, baseRepo)
|
||||
prNumber, branchWithOwner, err := prSelectorForCurrentBranch(ctx, baseRepo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
pr, err = api.PullRequestForBranch(apiClient, baseRepo, "", branchWithOwner)
|
||||
if prNumber != 0 {
|
||||
pr, err = api.PullRequestByNumber(apiClient, baseRepo, prNumber)
|
||||
} else {
|
||||
pr, err = api.PullRequestForBranch(apiClient, baseRepo, "", branchWithOwner)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue