{"record":{"id":"3acbdb081e37b420","repo":"cli/cli","slug":"the-s-repository-has-disabled-issues","errorCode":null,"errorMessage":"the '%s' repository has disabled issues","messagePattern":"the '(.+?)' repository has disabled issues","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"api/queries_issue.go","lineNumber":451,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}`\n\n\tvariables := map[string]interface{}{\n\t\t\"owner\":  repo.RepoOwner(),\n\t\t\"repo\":   repo.RepoName(),\n\t\t\"viewer\": options.Username,\n\t}\n\n\tvar resp response\n\terr := client.GraphQL(repo.RepoHost(), query, variables, &resp)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif !resp.Repository.HasIssuesEnabled {\n\t\treturn nil, fmt.Errorf(\"the '%s' repository has disabled issues\", ghrepo.FullName(repo))\n\t}\n\n\tpayload := IssuesPayload{\n\t\tAssigned: IssuesAndTotalCount{\n\t\t\tIssues:     resp.Repository.Assigned.Nodes,\n\t\t\tTotalCount: resp.Repository.Assigned.TotalCount,\n\t\t},\n\t\tMentioned: IssuesAndTotalCount{\n\t\t\tIssues:     resp.Repository.Mentioned.Nodes,\n\t\t\tTotalCount: resp.Repository.Mentioned.TotalCount,\n\t\t},\n\t\tAuthored: IssuesAndTotalCount{\n\t\t\tIssues:     resp.Repository.Authored.Nodes,\n\t\t\tTotalCount: resp.Repository.Authored.TotalCount,\n\t\t},\n\t}\n\n\treturn &payload, nil","sourceCodeStart":433,"sourceCodeEnd":469,"githubUrl":"https://github.com/cli/cli/blob/0eeec0b92edbe70199f9768522f831d3534f41ad/api/queries_issue.go#L433-L469","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"enabled=$(gh repo view owner/repo --json hasIssuesEnabled --jq .hasIssuesEnabled)\n[ \"$enabled\" = true ] || { echo 'issues disabled on owner/repo'; exit 1; }\ngh issue list -R owner/repo","typeGuard":null,"tryCatchPattern":"gh issue list -R owner/repo 2>&1 | grep -q 'has disabled issues' && echo 'enable Issues in repo Settings > Features'","preventionTips":["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"],"tags":["issues","repository-settings","graphql","cli"],"backgroundTag":null,"analyzedSha":"0eeec0b92edbe70199f9768522f831d3534f41ad","analyzedAt":"2026-08-15T12:31:05.478Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}