INNER CODE UNIT · Python

is_writes_allowed

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

def is_writes_allowed() -> bool:
    """Check if write operations are allowed."""
    try:
        allow_writes = variables.get("allow_writes")
        return allow_writes.lower() == "true"
    except Exception:
        return False


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)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…