538 lines
26 KiB
Plaintext
538 lines
26 KiB
Plaintext
[1mdiff --git a/genqlient.graphql b/genqlient.graphql[m
|
|
[1mindex 12e2b80..5bf5e9a 100644[m
|
|
[1m--- a/genqlient.graphql[m
|
|
[1m+++ b/genqlient.graphql[m
|
|
[36m@@ -22,6 +22,31 @@[m [mquery GetCloneCredentials {[m
|
|
}[m
|
|
}[m
|
|
[m
|
|
[32m+[m[32mquery GetPipeline([m
|
|
[32m+[m[32m $id: String!,[m
|
|
[32m+[m[32m) {[m
|
|
[32m+[m[32m Pipeline([m
|
|
[32m+[m[32m id: $id,[m
|
|
[32m+[m[32m ) {[m
|
|
[32m+[m[32m id,[m
|
|
[32m+[m[32m name,[m
|
|
[32m+[m[32m url,[m
|
|
[32m+[m[32m pollInterval,[m
|
|
[32m+[m[32m cloneCredential {[m
|
|
[32m+[m[32m id,[m
|
|
[32m+[m[32m name,[m
|
|
[32m+[m[32m type,[m
|
|
[32m+[m[32m },[m
|
|
[32m+[m[32m runs {[m
|
|
[32m+[m[32m id,[m
|
|
[32m+[m[32m inProgress,[m
|
|
[32m+[m[32m result,[m
|
|
[32m+[m[32m buildOutput,[m
|
|
[32m+[m[32m stdout,[m
|
|
[32m+[m[32m stderr,[m
|
|
[32m+[m[32m }[m
|
|
[32m+[m[32m }[m
|
|
[32m+[m[32m}[m
|
|
[m
|
|
mutation CreatePipeline([m
|
|
$name: String!,[m
|
|
[1mdiff --git a/go.mod b/go.mod[m
|
|
[1mindex a29c87c..4584f76 100644[m
|
|
[1m--- a/go.mod[m
|
|
[1m+++ b/go.mod[m
|
|
[36m@@ -3,16 +3,13 @@[m [mmodule git.ohea.xyz/cursorius/tui[m
|
|
go 1.20[m
|
|
[m
|
|
require ([m
|
|
[32m+[m [32mgithub.com/Khan/genqlient v0.5.0[m
|
|
github.com/charmbracelet/bubbles v0.15.0[m
|
|
github.com/charmbracelet/bubbletea v0.23.2[m
|
|
github.com/charmbracelet/lipgloss v0.6.0[m
|
|
)[m
|
|
[m
|
|
require ([m
|
|
[31m- github.com/Khan/genqlient v0.5.0 // indirect[m
|
|
[31m- github.com/agnivade/levenshtein v1.1.1 // indirect[m
|
|
[31m- github.com/alexflint/go-arg v1.4.2 // indirect[m
|
|
[31m- github.com/alexflint/go-scalar v1.0.0 // indirect[m
|
|
github.com/atotto/clipboard v0.1.4 // indirect[m
|
|
github.com/aymanbagabas/go-osc52 v1.2.1 // indirect[m
|
|
github.com/containerd/console v1.0.3 // indirect[m
|
|
[36m@@ -27,12 +24,8 @@[m [mrequire ([m
|
|
github.com/rivo/uniseg v0.2.0 // indirect[m
|
|
github.com/sahilm/fuzzy v0.1.0 // indirect[m
|
|
github.com/vektah/gqlparser/v2 v2.4.5 // indirect[m
|
|
[31m- golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect[m
|
|
golang.org/x/sync v0.1.0 // indirect[m
|
|
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect[m
|
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect[m
|
|
golang.org/x/text v0.3.7 // indirect[m
|
|
[31m- golang.org/x/tools v0.1.10 // indirect[m
|
|
[31m- golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect[m
|
|
[31m- gopkg.in/yaml.v2 v2.4.0 // indirect[m
|
|
)[m
|
|
[1mdiff --git a/go.sum b/go.sum[m
|
|
[1mindex 5c4ba8d..3c5c5da 100644[m
|
|
[1m--- a/go.sum[m
|
|
[1m+++ b/go.sum[m
|
|
[36m@@ -4,12 +4,10 @@[m [mgithub.com/Khan/genqlient v0.5.0 h1:TMZJ+tl/BpbmGyIBiXzKzUftDhw4ZWxQZ+1ydn0gyII=[m
|
|
github.com/Khan/genqlient v0.5.0/go.mod h1:EpIvDVXYm01GP6AXzjA7dKriPTH6GmtpmvTAwUUqIX8=[m
|
|
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=[m
|
|
github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=[m
|
|
[31m-github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=[m
|
|
github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=[m
|
|
[31m-github.com/alexflint/go-arg v1.4.2 h1:lDWZAXxpAnZUq4qwb86p/3rIJJ2Li81EoMbTMujhVa0=[m
|
|
github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM=[m
|
|
[31m-github.com/alexflint/go-scalar v1.0.0 h1:NGupf1XV/Xb04wXskDFzS0KWOLH632W/EO4fAFi+A70=[m
|
|
github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw=[m
|
|
[32m+[m[32mgithub.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=[m
|
|
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=[m
|
|
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=[m
|
|
github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=[m
|
|
[36m@@ -31,6 +29,7 @@[m [mgithub.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkX[m
|
|
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=[m
|
|
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=[m
|
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=[m
|
|
[32m+[m[32mgithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=[m
|
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=[m
|
|
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=[m
|
|
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=[m
|
|
[36m@@ -71,6 +70,7 @@[m [mgithub.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0/go.mod h1:Bd5NYQ[m
|
|
github.com/muesli/termenv v0.13.0/go.mod h1:sP1+uffeLaEYpyOTb8pLCUctGcGLnoFjSn4YJK5e2bc=[m
|
|
github.com/muesli/termenv v0.14.0 h1:8x9NFfOe8lmIWK4pgy3IfVEy47f+ppe3tUqdPZG2Uy0=[m
|
|
github.com/muesli/termenv v0.14.0/go.mod h1:kG/pF1E7fh949Xhe156crRUrHNyK221IuGO7Ez60Uc8=[m
|
|
[32m+[m[32mgithub.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=[m
|
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=[m
|
|
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=[m
|
|
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=[m
|
|
[36m@@ -79,6 +79,7 @@[m [mgithub.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD[m
|
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=[m
|
|
github.com/sahilm/fuzzy v0.1.0 h1:FzWGaw2Opqyu+794ZQ9SYifWv2EIXpwP4q8dY1kDAwI=[m
|
|
github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y=[m
|
|
[32m+[m[32mgithub.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=[m
|
|
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=[m
|
|
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=[m
|
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=[m
|
|
[36m@@ -86,6 +87,7 @@[m [mgithub.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+[m
|
|
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=[m
|
|
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=[m
|
|
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=[m
|
|
[32m+[m[32mgithub.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=[m
|
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=[m
|
|
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=[m
|
|
github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=[m
|
|
[36m@@ -99,7 +101,6 @@[m [mgolang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh[m
|
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=[m
|
|
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=[m
|
|
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=[m
|
|
[31m-golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o=[m
|
|
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=[m
|
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=[m
|
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=[m
|
|
[36m@@ -138,12 +139,10 @@[m [mgolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm[m
|
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=[m
|
|
golang.org/x/tools v0.0.0-20200815165600-90abf76919f3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=[m
|
|
golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=[m
|
|
[31m-golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20=[m
|
|
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=[m
|
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=[m
|
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=[m
|
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=[m
|
|
[31m-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=[m
|
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=[m
|
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=[m
|
|
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=[m
|
|
[36m@@ -151,6 +150,6 @@[m [mgopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=[m
|
|
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=[m
|
|
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=[m
|
|
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=[m
|
|
[31m-gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=[m
|
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=[m
|
|
[32m+[m[32mgopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=[m
|
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=[m
|
|
[1mdiff --git a/queries/generated.go b/queries/generated.go[m
|
|
[1mindex 31eb59c..8f2ad79 100644[m
|
|
[1m--- a/queries/generated.go[m
|
|
[1m+++ b/queries/generated.go[m
|
|
[36m@@ -240,6 +240,112 @@[m [mfunc (v *GetCloneCredentialsResponse) GetCloneCredentials() []*GetCloneCredentia[m
|
|
return v.CloneCredentials[m
|
|
}[m
|
|
[m
|
|
[32m+[m[32m// GetPipelinePipeline includes the requested fields of the GraphQL type Pipeline.[m
|
|
[32m+[m[32m// The GraphQL type's documentation follows.[m
|
|
[32m+[m[32m//[m
|
|
[32m+[m[32m// A pipeline for running ci jobs[m
|
|
[32m+[m[32mtype GetPipelinePipeline struct {[m
|
|
[32m+[m [32m// The id of the pipeline.[m
|
|
[32m+[m [32mId string `json:"id"`[m
|
|
[32m+[m [32m// The name of the pipeline.[m
|
|
[32m+[m [32mName string `json:"name"`[m
|
|
[32m+[m [32m// The url of the pipeline.[m
|
|
[32m+[m [32mUrl string `json:"url"`[m
|
|
[32m+[m [32m// The polling interval for the pipeline.[m
|
|
[32m+[m [32mPollInterval int `json:"pollInterval"`[m
|
|
[32m+[m [32m// The configured credential for cloning the pipeline source.[m
|
|
[32m+[m [32mCloneCredential *GetPipelinePipelineCloneCredential `json:"cloneCredential"`[m
|
|
[32m+[m [32m// The list of runs for the pipeline.[m
|
|
[32m+[m [32mRuns []GetPipelinePipelineRunsRun `json:"runs"`[m
|
|
[32m+[m[32m}[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetId returns GetPipelinePipeline.Id, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipeline) GetId() string { return v.Id }[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetName returns GetPipelinePipeline.Name, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipeline) GetName() string { return v.Name }[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetUrl returns GetPipelinePipeline.Url, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipeline) GetUrl() string { return v.Url }[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetPollInterval returns GetPipelinePipeline.PollInterval, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipeline) GetPollInterval() int { return v.PollInterval }[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetCloneCredential returns GetPipelinePipeline.CloneCredential, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipeline) GetCloneCredential() *GetPipelinePipelineCloneCredential {[m
|
|
[32m+[m [32mreturn v.CloneCredential[m
|
|
[32m+[m[32m}[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetRuns returns GetPipelinePipeline.Runs, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipeline) GetRuns() []GetPipelinePipelineRunsRun { return v.Runs }[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetPipelinePipelineCloneCredential includes the requested fields of the GraphQL type CloneCredential.[m
|
|
[32m+[m[32m// The GraphQL type's documentation follows.[m
|
|
[32m+[m[32m//[m
|
|
[32m+[m[32m// A credential for authenticating with the pipeline source host.[m
|
|
[32m+[m[32mtype GetPipelinePipelineCloneCredential struct {[m
|
|
[32m+[m [32m// The id of the credential.[m
|
|
[32m+[m [32mId string `json:"id"`[m
|
|
[32m+[m [32m// The name of the credential.[m
|
|
[32m+[m [32mName string `json:"name"`[m
|
|
[32m+[m [32m// The credential type.[m
|
|
[32m+[m [32mType string `json:"type"`[m
|
|
[32m+[m[32m}[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetId returns GetPipelinePipelineCloneCredential.Id, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipelineCloneCredential) GetId() string { return v.Id }[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetName returns GetPipelinePipelineCloneCredential.Name, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipelineCloneCredential) GetName() string { return v.Name }[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetType returns GetPipelinePipelineCloneCredential.Type, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipelineCloneCredential) GetType() string { return v.Type }[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetPipelinePipelineRunsRun includes the requested fields of the GraphQL type Run.[m
|
|
[32m+[m[32m// The GraphQL type's documentation follows.[m
|
|
[32m+[m[32m//[m
|
|
[32m+[m[32m// A pipeline run[m
|
|
[32m+[m[32mtype GetPipelinePipelineRunsRun struct {[m
|
|
[32m+[m [32m// The id of the run.[m
|
|
[32m+[m [32mId string `json:"id"`[m
|
|
[32m+[m [32m// The progress status of the run.[m
|
|
[32m+[m [32mInProgress *bool `json:"inProgress"`[m
|
|
[32m+[m [32m// The result of the run.[m
|
|
[32m+[m [32mResult *float64 `json:"result"`[m
|
|
[32m+[m [32m// Logs of the top level container build for the run.[m
|
|
[32m+[m [32mBuildOutput *string `json:"buildOutput"`[m
|
|
[32m+[m [32m// The stdout used to validate the run.[m
|
|
[32m+[m [32mStdout *string `json:"stdout"`[m
|
|
[32m+[m [32m// The stderr used to validate the run.[m
|
|
[32m+[m [32mStderr *string `json:"stderr"`[m
|
|
[32m+[m[32m}[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetId returns GetPipelinePipelineRunsRun.Id, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipelineRunsRun) GetId() string { return v.Id }[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetInProgress returns GetPipelinePipelineRunsRun.InProgress, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipelineRunsRun) GetInProgress() *bool { return v.InProgress }[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetResult returns GetPipelinePipelineRunsRun.Result, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipelineRunsRun) GetResult() *float64 { return v.Result }[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetBuildOutput returns GetPipelinePipelineRunsRun.BuildOutput, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipelineRunsRun) GetBuildOutput() *string { return v.BuildOutput }[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetStdout returns GetPipelinePipelineRunsRun.Stdout, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipelineRunsRun) GetStdout() *string { return v.Stdout }[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetStderr returns GetPipelinePipelineRunsRun.Stderr, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelinePipelineRunsRun) GetStderr() *string { return v.Stderr }[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetPipelineResponse is returned by GetPipeline on success.[m
|
|
[32m+[m[32mtype GetPipelineResponse struct {[m
|
|
[32m+[m [32mPipeline *GetPipelinePipeline `json:"Pipeline"`[m
|
|
[32m+[m[32m}[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetPipeline returns GetPipelineResponse.Pipeline, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *GetPipelineResponse) GetPipeline() *GetPipelinePipeline { return v.Pipeline }[m
|
|
[32m+[m
|
|
// GetPipelinesPipelinesPipeline includes the requested fields of the GraphQL type Pipeline.[m
|
|
// The GraphQL type's documentation follows.[m
|
|
//[m
|
|
[36m@@ -387,6 +493,14 @@[m [mfunc (v *__CreateWebhookInput) GetWebhookType() string { return v.WebhookType }[m
|
|
// GetPipelineId returns __CreateWebhookInput.PipelineId, and is useful for accessing the field via an interface.[m
|
|
func (v *__CreateWebhookInput) GetPipelineId() string { return v.PipelineId }[m
|
|
[m
|
|
[32m+[m[32m// __GetPipelineInput is used internally by genqlient[m
|
|
[32m+[m[32mtype __GetPipelineInput struct {[m
|
|
[32m+[m [32mId string `json:"id"`[m
|
|
[32m+[m[32m}[m
|
|
[32m+[m
|
|
[32m+[m[32m// GetId returns __GetPipelineInput.Id, and is useful for accessing the field via an interface.[m
|
|
[32m+[m[32mfunc (v *__GetPipelineInput) GetId() string { return v.Id }[m
|
|
[32m+[m
|
|
func CreateCloneCredential([m
|
|
ctx context.Context,[m
|
|
client graphql.Client,[m
|
|
[36m@@ -610,6 +724,54 @@[m [mquery GetCloneCredentials {[m
|
|
return &data, err[m
|
|
}[m
|
|
[m
|
|
[32m+[m[32mfunc GetPipeline([m
|
|
[32m+[m [32mctx context.Context,[m
|
|
[32m+[m [32mclient graphql.Client,[m
|
|
[32m+[m [32mid string,[m
|
|
[32m+[m[32m) (*GetPipelineResponse, error) {[m
|
|
[32m+[m [32mreq := &graphql.Request{[m
|
|
[32m+[m [32mOpName: "GetPipeline",[m
|
|
[32m+[m [32mQuery: `[m
|
|
[32m+[m[32mquery GetPipeline ($id: String!) {[m
|
|
[32m+[m [32mPipeline(id: $id) {[m
|
|
[32m+[m [32mid[m
|
|
[32m+[m [32mname[m
|
|
[32m+[m [32murl[m
|
|
[32m+[m [32mpollInterval[m
|
|
[32m+[m [32mcloneCredential {[m
|
|
[32m+[m [32mid[m
|
|
[32m+[m [32mname[m
|
|
[32m+[m [32mtype[m
|
|
[32m+[m [32m}[m
|
|
[32m+[m [32mruns {[m
|
|
[32m+[m [32mid[m
|
|
[32m+[m [32minProgress[m
|
|
[32m+[m [32mresult[m
|
|
[32m+[m [32mbuildOutput[m
|
|
[32m+[m [32mstdout[m
|
|
[32m+[m [32mstderr[m
|
|
[32m+[m [32m}[m
|
|
[32m+[m [32m}[m
|
|
[32m+[m[32m}[m
|
|
[32m+[m[32m`,[m
|
|
[32m+[m [32mVariables: &__GetPipelineInput{[m
|
|
[32m+[m [32mId: id,[m
|
|
[32m+[m [32m},[m
|
|
[32m+[m [32m}[m
|
|
[32m+[m [32mvar err error[m
|
|
[32m+[m
|
|
[32m+[m [32mvar data GetPipelineResponse[m
|
|
[32m+[m [32mresp := &graphql.Response{Data: &data}[m
|
|
[32m+[m
|
|
[32m+[m [32merr = client.MakeRequest([m
|
|
[32m+[m [32mctx,[m
|
|
[32m+[m [32mreq,[m
|
|
[32m+[m [32mresp,[m
|
|
[32m+[m [32m)[m
|
|
[32m+[m
|
|
[32m+[m [32mreturn &data, err[m
|
|
[32m+[m[32m}[m
|
|
[32m+[m
|
|
func GetPipelines([m
|
|
ctx context.Context,[m
|
|
client graphql.Client,[m
|
|
[1mdiff --git a/schema.graphql b/schema.graphql[m
|
|
[1mindex 493b8a8..3e53e4c 100644[m
|
|
[1m--- a/schema.graphql[m
|
|
[1m+++ b/schema.graphql[m
|
|
[36m@@ -2,27 +2,63 @@[m [mschema {[m
|
|
query: Query[m
|
|
mutation: Mutation[m
|
|
}[m
|
|
[31m-"A credential for authenticating with the pipeline source host."[m
|
|
[31m-type CloneCredential {[m
|
|
[31m- "The id of the credential."[m
|
|
[32m+[m[32m"A secret available for use inside of a pipeline."[m
|
|
[32m+[m[32mtype Secret {[m
|
|
[32m+[m[32m "The id of the secret."[m
|
|
id: String![m
|
|
[31m- "The name of the credential."[m
|
|
[32m+[m[32m "The name of the secret."[m
|
|
name: String![m
|
|
[31m- "The secret for the credential."[m
|
|
[32m+[m[32m "The secret."[m
|
|
secret: String![m
|
|
[31m- "The credential type."[m
|
|
[31m- type: String![m
|
|
[31m- "The username to user with the credential."[m
|
|
[31m- username: String![m
|
|
}[m
|
|
[31m-"A webhook for triggering pipelines"[m
|
|
[31m-type Webhook {[m
|
|
[31m- "The id of the webhook."[m
|
|
[32m+[m[32m"A runner available for use inside of a pipeline."[m
|
|
[32m+[m[32mtype Runner {[m
|
|
[32m+[m[32m "The id of the runner."[m
|
|
id: String![m
|
|
[31m- "The secret used to validate the webhook."[m
|
|
[31m- secret: String![m
|
|
[31m- "The format of the webhook."[m
|
|
[31m- serverType: String![m
|
|
[32m+[m[32m "The name of the runner."[m
|
|
[32m+[m[32m name: String![m
|
|
[32m+[m[32m "The token."[m
|
|
[32m+[m[32m token: String![m
|
|
[32m+[m[32m}[m
|
|
[32m+[m[32m""[m
|
|
[32m+[m[32mtype Query {[m
|
|
[32m+[m[32m ""[m
|
|
[32m+[m[32m CloneCredential([m
|
|
[32m+[m[32m "The id of the requested credential."[m
|
|
[32m+[m[32m id: String![m
|
|
[32m+[m[32m ): CloneCredential[m
|
|
[32m+[m[32m ""[m
|
|
[32m+[m[32m CloneCredentials: [CloneCredential]![m
|
|
[32m+[m[32m ""[m
|
|
[32m+[m[32m Pipeline([m
|
|
[32m+[m[32m "The id of the requested pipeline."[m
|
|
[32m+[m[32m id: String![m
|
|
[32m+[m[32m ): Pipeline[m
|
|
[32m+[m[32m ""[m
|
|
[32m+[m[32m Pipelines: [Pipeline]![m
|
|
[32m+[m[32m ""[m
|
|
[32m+[m[32m Runners: [Runner]![m
|
|
[32m+[m[32m ""[m
|
|
[32m+[m[32m Secrets: [Secret]![m
|
|
[32m+[m[32m}[m
|
|
[32m+[m[32m"A pipeline for running ci jobs"[m
|
|
[32m+[m[32mtype Pipeline {[m
|
|
[32m+[m[32m "The configured credential for cloning the pipeline source."[m
|
|
[32m+[m[32m cloneCredential: CloneCredential[m
|
|
[32m+[m[32m "The id of the pipeline."[m
|
|
[32m+[m[32m id: String![m
|
|
[32m+[m[32m "The name of the pipeline."[m
|
|
[32m+[m[32m name: String![m
|
|
[32m+[m[32m "The polling interval for the pipeline."[m
|
|
[32m+[m[32m pollInterval: Int![m
|
|
[32m+[m[32m "The list of runs for the pipeline."[m
|
|
[32m+[m[32m runs: [Run!]![m
|
|
[32m+[m[32m "The list of secrets for the pipeline."[m
|
|
[32m+[m[32m secrets: [Secret!]![m
|
|
[32m+[m[32m "The url of the pipeline."[m
|
|
[32m+[m[32m url: String![m
|
|
[32m+[m[32m "The list of webhooks for the pipeline."[m
|
|
[32m+[m[32m webhooks: [Webhook!]![m
|
|
}[m
|
|
""[m
|
|
type Mutation {[m
|
|
[36m@@ -89,66 +125,32 @@[m [mtype Mutation {[m
|
|
pipelineId: String![m
|
|
): Pipeline[m
|
|
}[m
|
|
[31m-"A runner available for use inside of a pipeline."[m
|
|
[31m-type Runner {[m
|
|
[31m- "The id of the runner."[m
|
|
[31m- id: String![m
|
|
[31m- "The name of the runner."[m
|
|
[31m- name: String![m
|
|
[31m- "The token."[m
|
|
[31m- token: String![m
|
|
[31m-}[m
|
|
[31m-"A pipeline for running ci jobs"[m
|
|
[31m-type Pipeline {[m
|
|
[31m- "The configured credential for cloning the pipeline source."[m
|
|
[31m- cloneCredential: CloneCredential[m
|
|
[31m- "The id of the pipeline."[m
|
|
[32m+[m[32m"A webhook for triggering pipelines"[m
|
|
[32m+[m[32mtype Webhook {[m
|
|
[32m+[m[32m "The id of the webhook."[m
|
|
id: String![m
|
|
[31m- "The name of the pipeline."[m
|
|
[31m- name: String![m
|
|
[31m- "The polling interval for the pipeline."[m
|
|
[31m- pollInterval: Int![m
|
|
[31m- "The list of runs for the pipeline."[m
|
|
[31m- runs: [Run!]![m
|
|
[31m- "The list of secrets for the pipeline."[m
|
|
[31m- secrets: [Secret!]![m
|
|
[31m- "The url of the pipeline."[m
|
|
[31m- url: String![m
|
|
[31m- "The list of webhooks for the pipeline."[m
|
|
[31m- webhooks: [Webhook!]![m
|
|
[32m+[m[32m "The secret used to validate the webhook."[m
|
|
[32m+[m[32m secret: String![m
|
|
[32m+[m[32m "The format of the webhook."[m
|
|
[32m+[m[32m serverType: String![m
|
|
}[m
|
|
[31m-"A secret available for use inside of a pipeline."[m
|
|
[31m-type Secret {[m
|
|
[31m- "The id of the secret."[m
|
|
[32m+[m[32m"A credential for authenticating with the pipeline source host."[m
|
|
[32m+[m[32mtype CloneCredential {[m
|
|
[32m+[m[32m "The id of the credential."[m
|
|
id: String![m
|
|
[31m- "The name of the secret."[m
|
|
[32m+[m[32m "The name of the credential."[m
|
|
name: String![m
|
|
[31m- "The secret."[m
|
|
[32m+[m[32m "The secret for the credential."[m
|
|
secret: String![m
|
|
[31m-}[m
|
|
[31m-""[m
|
|
[31m-type Query {[m
|
|
[31m- ""[m
|
|
[31m- CloneCredential([m
|
|
[31m- "The id of the requested credential."[m
|
|
[31m- id: String![m
|
|
[31m- ): CloneCredential[m
|
|
[31m- ""[m
|
|
[31m- CloneCredentials: [CloneCredential]![m
|
|
[31m- ""[m
|
|
[31m- Pipeline([m
|
|
[31m- "The id of the requested pipeline."[m
|
|
[31m- id: String![m
|
|
[31m- ): Pipeline[m
|
|
[31m- ""[m
|
|
[31m- Pipelines: [Pipeline]![m
|
|
[31m- ""[m
|
|
[31m- Runners: [Runner]![m
|
|
[31m- ""[m
|
|
[31m- Secrets: [Secret]![m
|
|
[32m+[m[32m "The credential type."[m
|
|
[32m+[m[32m type: String![m
|
|
[32m+[m[32m "The username to user with the credential."[m
|
|
[32m+[m[32m username: String![m
|
|
}[m
|
|
"A pipeline run"[m
|
|
type Run {[m
|
|
[32m+[m[32m "Logs of the top level container build for the run."[m
|
|
[32m+[m[32m buildOutput: String[m
|
|
"The id of the run."[m
|
|
id: String![m
|
|
"The progress status of the run."[m
|
|
[1mdiff --git a/widget/pipelineList.go b/widget/pipelineList.go[m
|
|
[1mindex f38a92f..cd7aabf 100644[m
|
|
[1m--- a/widget/pipelineList.go[m
|
|
[1m+++ b/widget/pipelineList.go[m
|
|
[36m@@ -42,16 +42,16 @@[m [mfunc (m pipelineWidgetList) Update(msg tea.Msg) (tea.Model, tea.Cmd) {[m
|
|
[m
|
|
case "enter":[m
|
|
if m.list.Index() < len(m.list.Items())-1 {[m
|
|
[31m- //item := m.list.SelectedItem()[m
|
|
[31m- //if item, ok := item.(pipelineListItem); ok {[m
|
|
[31m- // return m, func() tea.Cmd {[m
|
|
[31m- // view, err := createPipelineEditForm(client, item.id)[m
|
|
[31m- // if err != nil {[m
|
|
[31m- // return err[m
|
|
[31m- // }[m
|
|
[31m- // return pipelineWidgetScreenSwitch(view)[m
|
|
[31m- // }[m
|
|
[31m- //}[m
|
|
[32m+[m [32mitem := m.list.SelectedItem()[m
|
|
[32m+[m [32mif item, ok := item.(pipelineListItem); ok {[m
|
|
[32m+[m [32mreturn m, func() tea.Msg {[m
|
|
[32m+[m [32mview, err := createPipelineWidgetView(m.client, item.id)[m
|
|
[32m+[m [32mif err != nil {[m
|
|
[32m+[m [32mreturn err[m
|
|
[32m+[m [32m}[m
|
|
[32m+[m [32mreturn pipelineWidgetScreenSwitch(view)[m
|
|
[32m+[m [32m}[m
|
|
[32m+[m [32m}[m
|
|
} else {[m
|
|
return m, func() tea.Msg {[m
|
|
view, err := createPipelineCreateForm(m.client, m.list.Width(), m.list.Height())[m
|