# Forest Infra – GitHub Ref Commit State

> Forest Infra – GitHub Ref Commit State is a paid API for AI agents from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-02).

Resolves a public GitHub branch ref to its current commit metadata (SHA, author, timestamp, verification status) without fetching a diff.

## Facts

- Endpoint: POST https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/repo/commit-state?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forest-infra-github-ref-commit-state-f0bf036a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6KO6qtwEpXG1KOaGprbb8

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability forest-infra-github-ref-commit-state-f0bf036a -d '<json body>'
```

Example prompt: What is the current commit SHA and author for the main branch of torvalds/linux on GitHub?

## When to prefer this

Use this endpoint when you need a lightweight, cost-effective way to resolve a public GitHub branch to its current commit metadata without pulling diff data. Ideal for CI/CD preflight checks, dependency audits, or monitoring pipelines that only need the HEAD commit state. Prefer this over full GitHub API calls when you want a simple, pay-per-call microservice that abstracts GitHub API auth and returns normalized commit info.

## Known failure modes

- Repository not found or is private — returns an error indicating inaccessible repository
- Invalid ref name (branch does not exist) — returns a resolution failure
- GitHub API rate limiting or downtime — may return a timeout or upstream error
- Malformed repository string (not matching owner/name pattern) — rejected at input validation
- Ref is ambiguous (e.g. tag and branch share the same name) — may return unexpected commit

## How this service works

Resolve a public GitHub ref to commit metadata without fetching a diff. Verification is reported as published by GitHub and is not independently re-signed by Forest. Base mainnet USDC

## Output

Returns commit metadata for the specified GitHub branch ref, including the resolved commit SHA, author identity, commit timestamp, and GitHub-reported verification status. No diff or file content is included.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ref": {
   "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."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forest-infra-github-ref-commit-state-f0bf036a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run](https://www.zero.xyz/host/http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/llms.txt)
