INNER CODE UNIT · Python
handle_get_commit
nolabs-ai/deepfabric · tools-sdk/components/github/app.py:484
def handle_get_commit(args: dict) -> dict:
"""Get details of a specific commit."""
owner = args.get("owner")
repo = args.get("repo")
sha = args.get("sha")
if not owner or not repo or not sha:
return {"success": False, "result": "Missing required: owner, repo, sha", "error_type": "InvalidArguments"}
# Validate repo access
allowed, error = validate_repo_access(owner, repo)
if not allowed:
return {"success": False, "result": error, "error_type": "RepoNotAllowed"}
try:
endpoint = f"/repos/{owner}/{repo}/commits/{sha}"
data = github_api_request(endpoint)