cli/cli · error
the '%s' repository has disabled issues
Error message
the '%s' repository has disabled issues
What it means
IssueList in api/queries_issue.go checks the repository's HasIssuesEnabled flag after the GraphQL query succeeds. If the repo has issues turned off in settings, gh refuses to list issues because the API would return meaningless empty results, and reports the full repo name.
Source
Thrown at api/queries_issue.go:451
}
}
}
}`
variables := map[string]interface{}{
"owner": repo.RepoOwner(),
"repo": repo.RepoName(),
"viewer": options.Username,
}
var resp response
err := client.GraphQL(repo.RepoHost(), query, variables, &resp)
if err != nil {
return nil, err
}
if !resp.Repository.HasIssuesEnabled {
return nil, fmt.Errorf("the '%s' repository has disabled issues", ghrepo.FullName(repo))
}
payload := IssuesPayload{
Assigned: IssuesAndTotalCount{
Issues: resp.Repository.Assigned.Nodes,
TotalCount: resp.Repository.Assigned.TotalCount,
},
Mentioned: IssuesAndTotalCount{
Issues: resp.Repository.Mentioned.Nodes,
TotalCount: resp.Repository.Mentioned.TotalCount,
},
Authored: IssuesAndTotalCount{
Issues: resp.Repository.Authored.Nodes,
TotalCount: resp.Repository.Authored.TotalCount,
},
}
return &payload, nilView on GitHub (pinned to 0eeec0b92e)
Solutions
- Enable Issues in repo Settings > Features
- Confirm you targeted the right repo with -R/--repo
- If issues are intentionally off (e.g. a mirror), file issues in the designated tracker repo instead
Defensive patterns
Strategy: validation
Validate before calling
enabled=$(gh repo view owner/repo --json hasIssuesEnabled --jq .hasIssuesEnabled)
[ "$enabled" = true ] || { echo 'issues disabled on owner/repo'; exit 1; }
gh issue list -R owner/repo Try / catch
gh issue list -R owner/repo 2>&1 | grep -q 'has disabled issues' && echo 'enable Issues in repo Settings > Features'
Prevention
- Check hasIssuesEnabled in pre-flight checks for issue automation
- Maintain issue templates only in repos where Issues are enabled
- Point users at the correct tracker repo for mirrors
When it happens
Trigger: Running `gh issue list -R owner/repo` (or any issue-listing GraphQL path) where Settings > Features > Issues is unchecked, so resp.Repository.HasIssuesEnabled is false.
Common situations: New repos from certain templates with issues disabled; org policy disabling the Issues feature; wrong repo targeted (a docs/mirror repo that has issues off by design).
Related errors
- could not find branch %q in %s
- the `gh issue develop` command is not currently available
- could not resolve to a Team with the slug of '%s'
- '%s' not found
- pull request update failed: %w
AI-assisted analysis of cli/cli@0eeec0b92e (2026-08-15).
Data as JSON: /api/errors/3acbdb081e37b420.
Report an issue: GitHub.