Skip to content

Commit fb621d2

Browse files
committed
💅 code style
1 parent d09561d commit fb621d2

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

api/queries_pr.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,6 @@ func PullRequestForBranch(client *Client, repo ghrepo.Interface, baseBranch, hea
626626
type response struct {
627627
Repository struct {
628628
PullRequests struct {
629-
ID githubv4.ID
630629
Nodes []PullRequest
631630
}
632631
}
@@ -740,12 +739,7 @@ func PullRequestForBranch(client *Client, repo ghrepo.Interface, baseBranch, hea
740739
sortPullRequestsByState(prs)
741740

742741
for _, pr := range prs {
743-
if pr.HeadLabel() == headBranch {
744-
if baseBranch != "" {
745-
if pr.BaseRefName != baseBranch {
746-
continue
747-
}
748-
}
742+
if pr.HeadLabel() == headBranch && (baseBranch == "" || pr.BaseRefName == baseBranch) {
749743
return &pr, nil
750744
}
751745
}

0 commit comments

Comments
 (0)