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, nil

View on GitHub (pinned to 0eeec0b92e)

Solutions

  1. Enable Issues in repo Settings > Features
  2. Confirm you targeted the right repo with -R/--repo
  3. 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

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


AI-assisted analysis of cli/cli@0eeec0b92e (2026-08-15). Data as JSON: /api/errors/3acbdb081e37b420. Report an issue: GitHub.