INNER CODE UNIT · Python

_fetch_community

ghost-in-the-droid/android-agent · gitd/cli.py:44

def _fetch_community() -> list[dict]:
    """Fetch community registry community.json."""
    try:
        resp = requests.get(COMMUNITY_URL, headers=_GITHUB_HEADERS, timeout=15)
        resp.raise_for_status()
        data = resp.json()
        return data.get("skills", data) if isinstance(data, dict) else data
    except Exception as e:
        logger.warning("could not fetch community registry: %s", e)
        return []


def _is_github_url(target: str) -> bool:
    """Check if a string looks like a GitHub URL."""
    return bool(re.match(r"(https?://)?github\.com/", target)) or target.startswith("github.com/")


def _is_local_path(target: str) -> bool:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…