File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,9 @@ func prStatus(cmd *cobra.Command, args []string) error {
8181 return err
8282 }
8383
84+ repoOverride , _ := cmd .Flags ().GetString ("repo" )
8485 currentPRNumber , currentPRHeadRef , err := prSelectorForCurrentBranch (ctx , baseRepo )
85- if err != nil {
86+ if err != nil && repoOverride == "" {
8687 return err
8788 }
8889
@@ -100,6 +101,8 @@ func prStatus(cmd *cobra.Command, args []string) error {
100101 printHeader (out , "Current branch" )
101102 if prPayload .CurrentPR != nil {
102103 printPrs (out , 0 , * prPayload .CurrentPR )
104+ } else if currentPRHeadRef == "" {
105+ printMessage (out , " There is no current branch" )
103106 } else {
104107 message := fmt .Sprintf (" There is no pull request associated with %s" , utils .Cyan ("[" + currentPRHeadRef + "]" ))
105108 printMessage (out , message )
You can’t perform that action at this time.
0 commit comments