diff --git a/pkg/cmd/pr/status/status.go b/pkg/cmd/pr/status/status.go index 3877fb1cf..2436934bf 100644 --- a/pkg/cmd/pr/status/status.go +++ b/pkg/cmd/pr/status/status.go @@ -87,6 +87,7 @@ func statusRun(opts *StatusOptions) error { var currentHeadRefBranchName string if !opts.HasRepoOverride { + // We must be in a repo without the override currentBranchName, err = opts.Branch() if err != nil && !errors.Is(err, git.ErrNotOnAnyBranch) { return fmt.Errorf("could not query for pull request for current branch: %w", err)