Skip to content

`GET /v1/repos/{org}/{repo}/refs?q=` — the repo's branches and tags for a searchable ref picker (ADR-0046), backed by the repo's `ForgeConnection`. `q`, when set, is a case-insensitive substring the ref name must contain (applied by the adapter, since neither forge's list API takes a search param). Branches sort before tags, each group name-ascending, so the picker order is stable regardless of forge return order. Scoped to branches + tags. Read capability.

GET
/v1/repos/{org}/{repo}/refs
curl --request GET \
--url https://example.com/v1/repos/example/example/refs
org
required
string

Repo owner

repo
required
string

Repo name

q
string

Case-insensitive substring the ref name must contain

The repo’s branches and tags

Media typeapplication/json

GET /v1/repos/{org}/{repo}/refs?q= body: the repo’s branches and tags for a searchable ref picker (ADR-0046). Scoped to branches + tags — recent commits and open-PR head-refs are a deliberate follow-up, not part of v1.

object
refs
required

Branches first, then tags; each group name-sorted.

Array<object>

One branch or tag: its kind, bare name, and the short SHA of the commit it points at (a resolved-SHA hint for the picker row). The full SHA is intentionally omitted — selecting a ref re-resolves it through the pipelines endpoint, which is the authority on the pinned commit.

object
kind
required

branch or tag.

string
name
required

The bare ref name (no refs/{heads,tags}/ prefix), e.g. main, v0.3.1.

string
short_sha
required

The 7-char short SHA of the commit the ref points at.

string
Examplegenerated
{
"refs": [
{
"kind": "example",
"name": "example",
"short_sha": "example"
}
]
}