fix(providers): GitHub internal repos are not private

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Sonnet 5.5 committed 2026-11-16 17:21:42 +01:00
1 parent 5184cc9a95
commit 15cd03aedf
2 files changed
+19 -1

No files matched your search

+7 -1
View File
@@ -62,7 +62,13 @@ impl Provider for GitHub {
if !v["private"].is_boolean() {
return Err(Error::Other("response has no `private` flag".into()));
}
Ok(repo(&v))
let mut r = repo(&v);
// `internal` repos (GitHub Enterprise) have `private: true` but are readable by the
// whole enterprise: only an explicit "private" counts as private.
if let Some(vis) = v["visibility"].as_str() {
r.private = vis == "private";
}
Ok(r)
}
fn list_repos(&self) -> Result<Vec<RemoteRepo>> {