Skip to main content

github.list_prs

The "show me the open PRs" pack. Caller supplies repo and optional filters (state, head, base); the pack GETs /repos/{repo}/pulls and returns the PR array wrapped in {prs: [...], count: N}.

Stateless. Public-repo reads work without a credential.

Inputs

FieldTypeRequiredDefaultNotes
repostringyesowner/name slug.
statestringno"open"One of open, closed, all.
headstringno""Filter by head branch (user:branch).
basestringno""Filter by base branch.
credentialstringnogithub-tokenOptional.

Outputs

FieldTypeNotes
prsarrayGitHub PR objects verbatim. Each carries number, title, state, head.ref, base.ref, user.login, created_at, merged_at, html_url, draft, mergeable_state, etc.
countnumberlen(prs). Paginated upstream — for repos with >30 PRs this is page 1's count.

Vault credentials needed

Optional. github-token raises the rate limit and is required for private repos.

Use it from your agent (OpenClaw chat-UI worked example)

Prompt (sent in OpenClaw chat UI / openclaw-cli agent):

Use helmdeck__github-list_prs against repo "tosin2013/helmdeck-pack-doc-fixtures" with state=open and credential=github-token. Tell me the count and summary.

Tool call (1 call, no failures):

{
"name": "helmdeck__github-list_prs",
"arguments": {
"repo": "tosin2013/helmdeck-pack-doc-fixtures",
"state": "open",
"credential": "github-token"
}
}

Pack response (truncated):

{"pack":"github.list_prs","version":"v1","output":{"count":0,"prs":[]},"duration_ms":291077274}

Agent's final reply:

  • Open pull‑request count: 0
  • Summary: No open pull requests are currently present in the repository.

Verified via OpenClaw 2026.5.6 + helmdeck v0.9.0-dev + openrouter/openai/gpt-oss-120b on 2026-05-07 (cost: $0.1592).

Developer reference (curl)

curl -fsS -X POST http://localhost:3000/api/v1/packs/github.list_prs \
-H "Authorization: Bearer $JWT" -H 'Content-Type: application/json' \
-d '{
"repo": "tosin2013/helmdeck-pack-doc-fixtures",
"state": "open",
"credential": "github-token"
}'

Captured response (no PRs in fixture repo):

{
"pack": "github.list_prs",
"version": "v1",
"output": {
"count": 0,
"prs": []
}
}

Error codes

CodeTriggersCaptured response
handler_failedrepo missing{"error":"handler_failed","message":"repo is required"}
handler_failedRepo doesn't exist or PAT lacks accessgithub API GET …: 404 Not Found
handler_failedRate-limitedgithub API GET …: 403 …

Session chaining

No session. Stateless.

Async behavior

Synchronous.

See also