fix: doctor status must be honest — show real capability per channel
Before: everything under tier 0 showed ✅ with vague descriptions After: each channel shows its actual capability and limitations Changes: - GitHub: 'Public repos only. Set github_token for private repos' - Twitter: shows 'Full access' vs 'Read-only' depending on birdx - Bilibili: ⚠️ warning on servers about potential IP blocks - XiaoHongShu: friendly message when no cookie (was showing Jina 451) - Doctor format: tier 0 items now show detailed status messages, not just ✅ - README: platform table updated to match reality (removed exaggerated claims) - README: doctor example updated to show new honest format
This commit is contained in:
@@ -13,7 +13,7 @@ from typing import List
|
||||
|
||||
class GitHubChannel(Channel):
|
||||
name = "github"
|
||||
description = "GitHub repos, issues, PRs, code"
|
||||
description = "GitHub repos and code"
|
||||
backends = ["GitHub API"]
|
||||
tier = 0
|
||||
|
||||
@@ -26,6 +26,12 @@ class GitHubChannel(Channel):
|
||||
h["Authorization"] = f"Bearer {token}"
|
||||
return h
|
||||
|
||||
def check(self, config=None):
|
||||
token = config.get("github_token") if config else None
|
||||
if token:
|
||||
return "ok", "Full access (authenticated)"
|
||||
return "ok", "Public repos only. Set github_token for private repos + higher rate limits"
|
||||
|
||||
def can_handle(self, url: str) -> bool:
|
||||
domain = urlparse(url).netloc.lower()
|
||||
return "github.com" in domain
|
||||
|
||||
Reference in New Issue
Block a user