package models type PipelineRecord struct { ID PipelineId `json:"id"` RepoDID string `json:"repoDid"` SourceRepo *string `json:"sourceRepo,omitempty"` Commit string `json:"commit"` CreatedAt string `json:"createdAt"` Trigger PipelineTrigger `json:"trigger"` Workflows []*PipelineWorkflow `json:"workflows"` } type PipelineTrigger struct { Kind string `json:"kind"` Push *PipelinePushTrigger `json:"push,omitempty"` PullRequest *PipelinePullRequestTrigger `json:"pullRequest,omitempty"` Manual *PipelineManualTrigger `json:"manual,omitempty"` Schedule *PipelineScheduleTrigger `json:"schedule,omitempty"` } type PipelineScheduleTrigger struct { Ref string `json:"ref"` ScheduledAt string `json:"scheduledAt"` Sha string `json:"sha"` } type PipelinePushTrigger struct { Ref string `json:"ref"` NewCommit string `json:"newCommit"` OldCommit string `json:"oldCommit"` } type PipelinePullRequestTrigger struct { Action *string `json:"action,omitempty"` SourceRepo *string `json:"sourceRepo,omitempty"` SourceBranch *string `json:"sourceBranch,omitempty"` SourceCommit string `json:"sourceCommit"` TargetBranch string `json:"targetBranch"` Pull *string `json:"pull,omitempty"` } type PipelineManualTrigger struct { Ref *string `json:"ref,omitempty"` SourceRepo *string `json:"sourceRepo,omitempty"` Inputs []*PipelineInputPair `json:"inputs,omitempty"` } type PipelineInputPair struct { Key string `json:"key"` Value string `json:"value"` } type PipelineWorkflow struct { ID string `json:"id"` Name string `json:"name"` Definition *WorkflowDefinition `json:"definition"` Status string `json:"status"` Error *string `json:"error,omitempty"` StartedAt *string `json:"startedAt,omitempty"` FinishedAt *string `json:"finishedAt,omitempty"` } type WorkflowDefinition struct { ID string `json:"id"` Name string `json:"name"` Source WorkflowDefinitionSource `json:"source"` Triggers []string `json:"triggers"` Hash *string `json:"hash,omitempty"` } type WorkflowDefinitionSource struct { File *WorkflowFileSource `json:"file,omitempty"` External *WorkflowExternalSource `json:"external,omitempty"` } type WorkflowFileSource struct { Repo string `json:"repo"` Commit string `json:"commit"` Path string `json:"path"` Lines *WorkflowLineRange `json:"lines,omitempty"` } type WorkflowLineRange struct { Start int64 `json:"start"` End int64 `json:"end"` } type WorkflowExternalSource struct { Name string `json:"name"` Link string `json:"link"` }