check for disabled issues in issue view command
This commit is contained in:
parent
50a89564a7
commit
fc25a4e9ed
2 changed files with 39 additions and 0 deletions
|
|
@ -215,6 +215,14 @@ func issueView(cmd *cobra.Command, args []string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
issuesEnabled, err := api.HasIssuesEnabled(apiClient, baseRepo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !issuesEnabled {
|
||||
return fmt.Errorf("the '%s/%s' repository has disabled issues", baseRepo.RepoOwner(), baseRepo.RepoName())
|
||||
}
|
||||
|
||||
issue, err := issueFromArg(apiClient, baseRepo, args[0])
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue