File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -319,6 +319,6 @@ func TestSdLog_WhenStatusFlag_ShowsDraftStatus(t *testing.T) {
319319
320320 out := testParseArguments ("log" , "--status" )
321321
322- assert .Contains (out , "[open]" )
322+ assert .NotContains (out , "[open]" )
323323 assert .Contains (out , "[draft]" )
324324}
Original file line number Diff line number Diff line change @@ -183,16 +183,17 @@ func (m logStatusModel) formatStatus(status *util.PullRequestStatus) string {
183183 return m .spinner .View ()
184184 }
185185 var parts []string
186- switch status .State {
187- case util .PullRequestStateOpen :
188- parts = append (parts , color .CyanString ("[open]" ))
189- case util .PullRequestStateMerged :
190- parts = append (parts , purpleColor .Sprint ("[merged]" ))
191- case util .PullRequestStateClosed :
192- parts = append (parts , color .RedString ("[closed]" ))
193- }
194186 if status .IsDraft {
195187 parts = append (parts , grayColor .Sprint ("[draft]" ))
188+ } else {
189+ switch status .State {
190+ case util .PullRequestStateOpen :
191+ parts = append (parts , color .CyanString ("[open]" ))
192+ case util .PullRequestStateMerged :
193+ parts = append (parts , purpleColor .Sprint ("[merged]" ))
194+ case util .PullRequestStateClosed :
195+ parts = append (parts , color .RedString ("[closed]" ))
196+ }
196197 }
197198 checks := status .Checks
198199 total := checks .Total ()
You can’t perform that action at this time.
0 commit comments