github.refs.resolve ​
Resolve a branch / tag / latest-release to a commit SHA
Resolve a tracked git revision to a concrete commit SHA.
GitOps applications follow one of three revision kinds; this workflow turns any of them into the immutable commit SHA to reconcile from:
- branch: resolve the branch HEAD commit.
- tag: resolve the tag (annotated or lightweight) to its commit.
- latest_release: find the newest published (non-draft) release, then resolve its tag to a commit.
Inputs:
- owner: Repository owner (required).
- repo: Repository name (required).
- ref_kind: One of "branch" | "tag" | "latest_release" (required).
- ref: Branch or tag name (required for branch/tag; ignored for latest_release).
Outputs (terminal state_data):
- commit_sha: str — the resolved commit SHA.
- resolved_ref: str — the concrete ref name (e.g. the tag name chosen for latest_release).
- ref_kind: str — echoed.
Plugin required: github auth via installation_bearer (see _auth.py).
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-github |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
owner | string | Yes | — | Repository owner |
repo | string | Yes | — | Repository name |
ref_kind | string | Yes | — | branch |
ref | string | No | — | Branch or tag name (ignored for latest_release) |
organization_uuid | uuid | No | — | Optional organization context |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
owner | string | No | — | — |
repo | string | No | — | — |
ref | string | No | — | — |
organization_uuid | uuid | No | — | — |
commit_sha | string | No | — | — |
resolved_ref | string | No | — | — |
ref_kind | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
failed_layer | json | No | — | — |
failed_step | json | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "github.refs.resolve",
"initial_data": {
"owner": "value",
"repo": "value",
"ref_kind": "value"
}
}