Return an error if the pr was already merged

This commit is contained in:
Corey Johnson 2020-05-04 10:25:38 -07:00
parent 5cc60c669e
commit 2f075fca73

View file

@ -395,8 +395,8 @@ func prReopen(cmd *cobra.Command, args []string) error {
}
if pr.State == "MERGED" {
fmt.Fprintf(colorableErr(cmd), "%s Pull request #%d can't be reopened because it was already merged\n", utils.Red("!"), pr.Number)
return nil
err := fmt.Errorf("%s Pull request #%d can't be reopened because it was already merged", utils.Red("!"), pr.Number)
return err
}
if !pr.Closed {