{"record":{"id":"26071f1937ed6c7c","repo":"zeroclaw-labs/zeroclaw","slug":"git-channel-has-no-repositories-to-poll-set-repo","errorCode":null,"errorMessage":"git channel has no repositories to poll; set `repos` or grant the provider access to at least one repository","messagePattern":"git channel has no repositories to poll; set `repos` or grant the provider access to at least one repository","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/git/channel.rs","lineNumber":511,"sourceCode":"                    \"provider\": self.provider.name(),\n                    \"bot\": mention_handle,\n                    \"repos\": repos.iter().map(ToString::to_string).collect::<Vec<_>>(),\n                    \"poll_interval_secs\": interval.as_secs(),\n                    \"mention_only\": self.cfg.mention_only,\n                    \"transports\": {\n                        \"issues\": plan.issues,\n                        \"comments\": plan.comments,\n                        \"review_comments\": plan.review_comments,\n                        \"releases\": plan.releases,\n                        \"workflow_runs\": plan.workflow_runs,\n                        \"events_backbone\": self.cfg.events_backbone,\n                    },\n                })\n            ),\n            \"git channel polling\"\n        );\n        if repos.is_empty() {\n            anyhow::bail!(\n                \"git channel has no repositories to poll; set `repos` or grant the \\\n                 provider access to at least one repository\"\n            );\n        }\n        if !plan.any() {\n            anyhow::bail!(\n                \"git channel `events` routing table ignores every event type; \\\n                 nothing would ever be delivered\"\n            );\n        }\n\n        let filter = EventFilter {\n            bot_login: &bot_login,\n            mention_handle: &mention_handle,\n            mention_only: self.cfg.mention_only,\n            listen_to_bots: self.cfg.listen_to_bots,\n        };\n        let mut state = PollState::new(chrono::Utc::now());","sourceCodeStart":493,"sourceCodeEnd":529,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/git/channel.rs#L493-L529","documentation":"On listen(), the git channel resolves its poll plan: the repos explicitly configured plus whatever the provider can discover. If that set is empty, polling has nothing to do, which the channel treats as a configuration error and bails — staying silent would hide a broken credential.","triggerScenarios":"channels.git.<alias>.repos is unset/empty AND the provider's repository listing returns nothing: GitHub App not installed on any repository, token with no repository access, or an installation the token cannot see.","commonSituations":"A new GitHub App that was never installed onto an org/repo; a fine-grained token missing repository access; expecting auto-discovery without granting any access.","solutions":["Install the GitHub App on (or grant the token access to) at least one repository","Or list repositories explicitly under channels.git.<alias>.repos","Verify the token/installation actually sees repositories via the provider's API before starting the channel"],"exampleFix":"# before\n[channels.git.mygh]\nprovider = \"github\"\n# no repos configured, app not installed anywhere → listen() bails\n\n# after\n[channels.git.mygh]\nprovider = \"github\"\nrepos = [\"myorg/tooling\", \"myorg/infra\"]","handlingStrategy":"validation","validationCode":"// Rust — check before listen()\nif configured_repos.is_empty() {\n    let discovered = provider.list_repositories().await?;\n    if discovered.is_empty() {\n        anyhow::bail!(\n            \"git channel would poll nothing: set `repos` or grant the provider repository access\"\n        );\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install the GitHub App on target repositories before enabling the channel","Prefer explicit `repos` lists over relying on discovery","Startup smoke-test provider credentials against the provider's own API"],"tags":["git","configuration","repositories","github-app","startup"],"backgroundTag":"no-repositories-configured","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}