INNER CODE UNIT · Python

validate_repo_access

nolabs-ai/deepfabric · tools-sdk/components/github/app.py:59

def validate_repo_access(owner: str, repo: str) -> tuple[bool, str]:
    """Validate that a repository is in the allowlist.

    Returns:
        (allowed, error_message) - If not allowed, returns helpful error message
    """
    allowed_repos = get_allowed_repos()

    # If no allowlist configured, allow all (backwards compatibility)
    if not allowed_repos:
        return True, ""

    repo_full = f"{owner}/{repo}".lower()

    if repo_full in allowed_repos:
        return True, ""

    # Build helpful error message

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…