{"uid":"cap_b63vnjd-JseMdc0JnypyW","slug":"forest-infra-github-branch-state-8a54b7aa","name":"Forest Infra – GitHub Branch State","description":"Resolve whether a public GitHub branch exists and return its current head commit without cloning. Branch protection is null when the public API does not expose it. Base mainnet USDC","url":"https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/repo/branch-state?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"branch":{"type":"string","maxLength":256,"minLength":1,"description":"Repository branch whose current state should be checked."},"repository":{"type":"string","pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$","maxLength":200,"description":"Public owner/name repository to inspect."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8-uEc_6QQOzT9j7kVsNzl","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Checks whether a named branch exists in a public GitHub repository and returns its current head commit SHA without cloning.","exampleAgentPrompt":"Does the branch feature/payment-v2 still exist in the repo acme-corp/backend, and if so what's its current head commit?","exampleUseCases":[{"title":"Verify PR branch before merging","prompt":"Can you check if the branch fix/auth-token-refresh still exists in myorg/api-server and tell me what commit it's currently pointing to?"},{"title":"CI pipeline branch health check","prompt":"Before we trigger the deploy, confirm that the release/2.4.0 branch exists in deployteam/platform and grab its latest commit SHA."},{"title":"Monitor open-source fork branch","prompt":"I want to know if the branch experiment/new-renderer is still live in torvalds/linux and what the current head commit is on it."}],"resultDescription":"Returns whether the specified branch exists in the public GitHub repository, the current head commit SHA for that branch, and a null branch protection field (since the public GitHub API does not expose protection rules without authentication).","failureModes":["Branch does not exist — returns existence false with no commit data","Repository not found or is private — API cannot access it and returns an error or empty result","Malformed repository string (not owner/name pattern) — rejected by input validation","Branch name exceeds 256 characters — rejected by schema validation","GitHub API rate limiting — may result in transient errors or delayed responses"],"whenToPreferThis":"Use this endpoint when you need a fast, lightweight check of a GitHub branch's existence and current head commit without the overhead of cloning or authenticating. Ideal for CI/CD pipelines, agent workflows that gate on branch state, or any scenario where you need to verify a branch tip on a public repository cheaply. Prefer this over full Git clone operations or heavier GitHub API wrappers when you only need branch existence and the latest commit SHA.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T00:44:47.840Z","isFirstParty":false,"canonicalSlug":"forest-infra-github-branch-state-8a54b7aa"}