-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issuehelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
When you run gh pr view
, for example, we will look up the current branch and display the latest PR that has it as its head branch. We do this even for closed PRs so that operations like gh pr view
and gh pr reopen
can work.
When one is on the default branch, however, I don't think the same logic should apply. Looking up closed PRs that have main
as their head branch is most likely going to surface spammy or otherwise defunct PRs. I would suggest that the fix is to only scope the lookup to open PRs while on the default branch.
The starting point in our codebase for this would be:
cli/pkg/cmd/pr/shared/finder.go
Line 143 in 99cbfd3
pr, err = findForBranch(httpClient, f.repo, opts.BaseBranch, f.branchName, opts.States, fields.ToSlice()) |
vilmibm
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issuehelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic