Skip to content
GitmoapAPIBeta
Schema

TriggerContext

What started this run — the event, the commit, the branch, and who or what triggered it. Available to every step.

Shape

  • repo_idRepositoryId (string · uuid)
  • repo_pathstring
  • before_shastring or nulloptionalThe commit the ref pointed at before the push — what a paths filter compares against. On a run started by hand, the commit its starter named to compare from, if any.
  • branchstring or nulloptional
  • buildMrBuildTargetmerge_resultsourceor nulloptionalWhich commit a merge-request-triggered run built.
  • commit_shastring or nulloptional
  • depthinteger · int32optional0–∞How many pushes made by pipeline runs led to this run, one after another; 0 when no pipeline's push started it.
  • every_stepbooleanoptionalEvery step runs, whatever its path filter says — asked for by whoever started the run.
  • extraobjectoptionalAdditional fields supplied by whatever started the run, passed along without being interpreted.
  • kindTriggerKindpushmerge_requesttagschedulemanualoptionalWhat started this run.
  • mr_idMergeRequestId (integer · int64) or nulloptional
  • paramsobjectoptionalThe values a person supplied when starting the run, keyed by the parameter names the pipeline's manual trigger declares.
  • ref_namestring or nulloptionalThe full ref (e.g. refs/tags/v1.2.0). Set for runs a tag started, which branch cannot describe.
  • root_group_idGroupId (string · uuid) or nulloptionalThe organisation this run belongs to — the root group of the repository it was triggered for. Recorded when the run starts and never recalculated, so a repository moved to a different organisation part-way through a run keeps the artifacts, logs and cache it has already produced. Absent on runs that started before runs recorded this.
  • schedule_stemstring or nulloptionalWhich scheduled trigger fired, when kind is schedule.
  • source_shastring or nulloptionalThe source-branch commit this run tested: a merge request's source head for a merge-request run, whichever commit it built, and the commit itself for a push or manual run. Set by the platform; absent on a run whose graph the caller supplied, which never counts toward a merge request's pipelines.
  • target_branchstring or nulloptionalThe merge request's target branch.
  • target_shastring or nulloptionalThe target branch's tip this merge-request run was tested against. Once the target branch moves on, the merge check reports a merge-result run as out of date.
  • triggered_byActorSummaryoptionalWho started the run, set by the platform from the authenticated caller; a value supplied in a request is ignored.
  • trustTriggerTrusttrusteduntrustedoptionalWhether the code being built is trusted with the repository's connections and secrets. Set by the platform when the run starts, whatever a request says.
  • trust_reasonTrustReason or nulloptionalWhy the run has the trust it has: who wrote the code, a person's merge or approval, or the organization's AI configuration. Absent on runs that started before this was recorded.

Example

Synthesized example
{
"repo_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"repo_path": "repo-path-e3cb",
"before_sha": "6b2b674795b61c6355d82cd81933c459ec1da8bc",
"branch": "fix/payload-build-pin",
"build": "merge_result",
"commit_sha": "c4d8a57030907f11c7a82484b996f3e61f257a94",
"depth": 12,
"every_step": false,
"extra": {},
"kind": "push",
"mr_id": 42,
"params": {},
"ref_name": "payments-api",
"root_group_id": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69",
"schedule_stem": "schedule-stem-c687",
"source_sha": "f0b473044f9d7d2fd88e4659fdbe16fe2d339495",
"target_branch": "main",
"target_sha": "1d3dfae20ca1eb7db73af9cbe3cff926d105580d",
"triggered_by": {
"email": "mara@acme.example",
"id": "id-4a1e",
"username": "lin",
"avatar_url": "https://gitmoap.example/acme/72de8f7c"
},
"trust": "trusted",
"trust_reason": {
"kind": "written_by_people"
}
}

Graph

Used by

Sent by 0 operations

No operation takes it as a request body.

Returned by 0 operations

No operation returns it directly.