cloudflare-native port of the tangled knot server
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package tangled
4
5// schema: sh.tangled.ci.triggerPipeline
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13const (
14 CiTriggerPipelineNSID = "sh.tangled.ci.triggerPipeline"
15)
16
17// CiTriggerPipeline_Input is the input argument to a sh.tangled.ci.triggerPipeline call.
18type CiTriggerPipeline_Input struct {
19 // ref: optional ref the SHA was resolved from, for display
20 Ref *string `json:"ref,omitempty" cborgen:"ref,omitempty"`
21 // repo: AT-URI of the sh.tangled.repo record
22 Repo string `json:"repo" cborgen:"repo"`
23 // sha: commit SHA to run the pipeline at
24 Sha string `json:"sha" cborgen:"sha"`
25 // workflows: Workflow names to run. When not provided, every dispatchable workflow is run.
26 Workflows []string `json:"workflows,omitempty" cborgen:"workflows,omitempty"`
27}
28
29// CiTriggerPipeline_Output is the output of a sh.tangled.ci.triggerPipeline call.
30type CiTriggerPipeline_Output struct {
31 // pipeline: AT-URI of the created pipeline
32 Pipeline string `json:"pipeline" cborgen:"pipeline"`
33}
34
35// CiTriggerPipeline calls the XRPC method "sh.tangled.ci.triggerPipeline".
36func CiTriggerPipeline(ctx context.Context, c util.LexClient, input *CiTriggerPipeline_Input) (*CiTriggerPipeline_Output, error) {
37 var out CiTriggerPipeline_Output
38 if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.ci.triggerPipeline", nil, input, &out); err != nil {
39 return nil, err
40 }
41
42 return &out, nil
43}