Merge pull request #1328 from ShubhankarKG/dev
Avoid crash in `issue close/reopen` when issue number is invalid
This commit is contained in:
commit
cc4c8438fa
1 changed files with 2 additions and 2 deletions
|
|
@ -709,7 +709,7 @@ func issueClose(cmd *cobra.Command, args []string) error {
|
|||
if errors.As(err, &idErr) {
|
||||
return fmt.Errorf("issues disabled for %s", ghrepo.FullName(baseRepo))
|
||||
} else if err != nil {
|
||||
return fmt.Errorf("failed to find issue #%d: %w", issue.Number, err)
|
||||
return err
|
||||
}
|
||||
|
||||
if issue.Closed {
|
||||
|
|
@ -744,7 +744,7 @@ func issueReopen(cmd *cobra.Command, args []string) error {
|
|||
if errors.As(err, &idErr) {
|
||||
return fmt.Errorf("issues disabled for %s", ghrepo.FullName(baseRepo))
|
||||
} else if err != nil {
|
||||
return fmt.Errorf("failed to find issue #%d: %w", issue.Number, err)
|
||||
return err
|
||||
}
|
||||
|
||||
if !issue.Closed {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue