Skip to content

Commit 2ac68cc

Browse files
committed
PullRequestForBranch: fix outdated error message
This method doesn't necessarily search through open pull requests.
1 parent 0f61272 commit 2ac68cc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

api/queries_pr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ func PullRequestForBranch(client *Client, repo ghrepo.Interface, baseBranch, hea
748748
}
749749
}
750750

751-
return nil, &NotFoundError{fmt.Errorf("no open pull requests found for branch %q", headBranch)}
751+
return nil, &NotFoundError{fmt.Errorf("no pull requests found for branch %q", headBranch)}
752752
}
753753

754754
// CreatePullRequest creates a pull request in a GitHub repository

pkg/cmd/pr/diff/diff_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ func TestPRDiff_no_current_pr(t *testing.T) {
171171
if err == nil {
172172
t.Fatal("expected error")
173173
}
174-
assert.Equal(t, `no open pull requests found for branch "feature"`, err.Error())
174+
assert.Equal(t, `no pull requests found for branch "feature"`, err.Error())
175175
}
176176

177177
func TestPRDiff_argument_not_found(t *testing.T) {

pkg/cmd/pr/view/view_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ func TestPRView_web_noResultsForBranch(t *testing.T) {
536536
defer restoreCmd()
537537

538538
_, err := runCommand(http, "blueberries", true, "-w")
539-
if err == nil || err.Error() != `no open pull requests found for branch "blueberries"` {
539+
if err == nil || err.Error() != `no pull requests found for branch "blueberries"` {
540540
t.Errorf("error running command `pr view`: %v", err)
541541
}
542542

0 commit comments

Comments
 (0)