This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / api / tangled / cidescribeWorkflowDefinition.go
2.3 kB 46 lines
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package tangled 4 5// schema: sh.tangled.ci.describeWorkflowDefinition 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/lex/util" 11) 12 13const ( 14 CiDescribeWorkflowDefinitionNSID = "sh.tangled.ci.describeWorkflowDefinition" 15) 16 17// CiDescribeWorkflowDefinition_Output is the output of a sh.tangled.ci.describeWorkflowDefinition call. 18type CiDescribeWorkflowDefinition_Output struct { 19 // derived: Whether the workflow definition is derived from this repository at all. When false, no commit-to-commit comparison is meaningful (e.g. definitions managed externally), and callers should not surface change warnings. 20 Derived bool `json:"derived" cborgen:"derived"` 21 // hash: Opaque fingerprint of the workflow definition as resolved by the spindle; for git-derived spindles this covers the workflow files at the commit, not their post-compilation expansion. Only equality is defined: identical resolved definitions MUST produce identical hashes for a given spindle deployment, and differing definitions SHOULD produce differing hashes. Absent when derived is false. 22 Hash *string `json:"hash,omitempty" cborgen:"hash,omitempty"` 23 // workflows: Names or paths of the effective workflow files that produced the hash, for display purposes. 24 Workflows []string `json:"workflows,omitempty" cborgen:"workflows,omitempty"` 25} 26 27// CiDescribeWorkflowDefinition calls the XRPC method "sh.tangled.ci.describeWorkflowDefinition". 28// 29// repo: Target repository DID the workflow definition belongs to. 30// sha: Commit SHA to resolve the workflow definition at 31// sourceRepo: Repository DID to resolve workflow definitions from, if different from the target repo (e.g. a fork for a fork-based pull request). 32func CiDescribeWorkflowDefinition(ctx context.Context, c util.LexClient, repo string, sha string, sourceRepo string) (*CiDescribeWorkflowDefinition_Output, error) { 33 var out CiDescribeWorkflowDefinition_Output 34 35 params := map[string]interface{}{} 36 params["repo"] = repo 37 params["sha"] = sha 38 if sourceRepo != "" { 39 params["sourceRepo"] = sourceRepo 40 } 41 if err := c.LexDo(ctx, util.Query, "", "sh.tangled.ci.describeWorkflowDefinition", params, nil, &out); err != nil { 42 return nil, err 43 } 44 45 return &out, nil 46}