Add "merged" message

This commit is contained in:
Corey Johnson 2020-05-04 10:10:03 -07:00
parent 4020084f02
commit 1ee31db033

View file

@ -359,7 +359,10 @@ func prClose(cmd *cobra.Command, args []string) error {
return err
}
if pr.Closed {
if pr.State == "MERGED" {
fmt.Fprintf(colorableErr(cmd), "%s Can't close pull request #%d because it was already merged\n", utils.Yellow("!"), pr.Number)
return nil
} else if pr.Closed {
fmt.Fprintf(colorableErr(cmd), "%s Pull request #%d is already closed\n", utils.Yellow("!"), pr.Number)
return nil
}