Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeAtomic
LibraryApp-github
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
ownerstringYes—Repository owner
repostringYes—Repository name
ref_kindstringYes—branch
refstringNo—Branch or tag name (ignored for latest_release)
organization_uuiduuidNo—Optional organization context

Output Schema ​

FieldTypeRequiredDefaultDescription
ownerstringNo——
repostringNo——
refstringNo——
organization_uuiduuidNo——
commit_shastringNo——
resolved_refstringNo——
ref_kindstringNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
errorstringNo——
error_typestringNo——
failed_layerjsonNo——
failed_stepjsonNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

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"
  }
}