INNER CODE UNIT · Python

handle_list_pull_requests

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

def handle_list_pull_requests(args: dict) -> dict:
    """List pull requests in a repository."""
    owner = args.get("owner")
    repo = args.get("repo")

    if not owner or not repo:
        return {"success": False, "result": "Missing required: owner, repo", "error_type": "InvalidArguments"}

    # Validate repo access
    allowed, error = validate_repo_access(owner, repo)
    if not allowed:
        return {"success": False, "result": error, "error_type": "RepoNotAllowed"}

    state = args.get("state", "open")
    per_page = min(args.get("perPage", 10), 100)

    try:
        endpoint = f"/repos/{owner}/{repo}/pulls?state={state}&per_page={per_page}"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…