···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package tangled
44+55+// schema: sh.tangled.ci.describeWorkflowDefinition
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/lex/util"
1111+)
1212+1313+const (
1414+ CiDescribeWorkflowDefinitionNSID = "sh.tangled.ci.describeWorkflowDefinition"
1515+)
1616+1717+// CiDescribeWorkflowDefinition_Output is the output of a sh.tangled.ci.describeWorkflowDefinition call.
1818+type CiDescribeWorkflowDefinition_Output struct {
1919+ // 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.
2020+ Derived bool `json:"derived" cborgen:"derived"`
2121+ // 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.
2222+ Hash *string `json:"hash,omitempty" cborgen:"hash,omitempty"`
2323+ // workflows: Names or paths of the effective workflow files that produced the hash, for display purposes.
2424+ Workflows []string `json:"workflows,omitempty" cborgen:"workflows,omitempty"`
2525+}
2626+2727+// CiDescribeWorkflowDefinition calls the XRPC method "sh.tangled.ci.describeWorkflowDefinition".
2828+//
2929+// repo: Target repository DID the workflow definition belongs to.
3030+// sha: Commit SHA to resolve the workflow definition at
3131+// sourceRepo: Repository DID to resolve workflow definitions from, if different from the target repo (e.g. a fork for a fork-based pull request).
3232+func CiDescribeWorkflowDefinition(ctx context.Context, c util.LexClient, repo string, sha string, sourceRepo string) (*CiDescribeWorkflowDefinition_Output, error) {
3333+ var out CiDescribeWorkflowDefinition_Output
3434+3535+ params := map[string]interface{}{}
3636+ params["repo"] = repo
3737+ params["sha"] = sha
3838+ if sourceRepo != "" {
3939+ params["sourceRepo"] = sourceRepo
4040+ }
4141+ if err := c.LexDo(ctx, util.Query, "", "sh.tangled.ci.describeWorkflowDefinition", params, nil, &out); err != nil {
4242+ return nil, err
4343+ }
4444+4545+ return &out, nil
4646+}