Return an error if the pr was already merged
This commit is contained in:
parent
5cc60c669e
commit
2f075fca73
1 changed files with 2 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue