MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / getChainloopMeta

Function getChainloopMeta

pkg/attestation/renderer/chainloop/chainloop.go:224–244  ·  view source on GitHub ↗
(att *v1.Attestation)

Source from the content-addressed store, hash-verified

222}
223
224func getChainloopMeta(att *v1.Attestation) *Metadata {
225 initializedAt := att.InitializedAt.AsTime()
226 finishedAt := att.GetFinishedAt().AsTime()
227 wfMeta := att.GetWorkflow()
228
229 return &Metadata{
230 InitializedAt: &initializedAt,
231 FinishedAt: &finishedAt,
232 Name: wfMeta.GetName(),
233 Team: wfMeta.GetTeam(),
234 Project: wfMeta.GetProject(),
235 WorkflowRunID: wfMeta.GetWorkflowRunId(),
236 WorkflowID: wfMeta.GetWorkflowId(),
237 WorkflowName: wfMeta.GetName(),
238 Organization: wfMeta.GetOrganization(),
239 ContractName: wfMeta.GetContractName(),
240 ContractVersion: wfMeta.GetSchemaRevision(),
241 ProjectVersion: wfMeta.GetVersion().GetVersion(),
242 ProjectVersionPrerelease: wfMeta.GetVersion().GetPrerelease(),
243 }
244}
245
246func ExtractStatement(envelope *dsse.Envelope) (*intoto.Statement, error) {
247 decodedPayload, err := envelope.DecodeB64Payload()

Callers 1

predicateCommonFunction · 0.85

Calls 12

GetSchemaRevisionMethod · 0.80
GetNameMethod · 0.65
GetFinishedAtMethod · 0.45
GetWorkflowMethod · 0.45
GetTeamMethod · 0.45
GetProjectMethod · 0.45
GetWorkflowRunIdMethod · 0.45
GetWorkflowIdMethod · 0.45
GetOrganizationMethod · 0.45
GetContractNameMethod · 0.45
GetVersionMethod · 0.45
GetPrereleaseMethod · 0.45

Tested by

no test coverage detected