feat(proto): list, disable and enable workflows per repository
- commit
- d244a03090e3dae702b8b02360979fc00b28aa45
- author
- brice · · 2026-10-18 19:12 UTC
- parent
- 4269eaf
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email - refs
- feat/workflow-disabletag: v0.7.0
5 files · +822 -116
M docs/services.md +1 -1
| @@ -10,7 +10,7 @@ | |||
| 10 | 10 | | `EventService` | `Watch` (streamed, resumable) | | |
| 11 | 11 | | `ServerService` | `GetVersion` (version and features), `GetSigningKey`, `RotateOIDCKey` (owner only) | | |
| 12 | 12 | | `TrustedKeyService` | `ListTrustedKeys`, `AddTrustedKey` and `RemoveTrustedKey` (owner only). `Commit.verification` carries the result of the check (feature `commit_signatures`) | | |
| 13 | - | | `RunService` | `ListRuns`, `GetRun`, `GetJob`, `GetJobLog` (streamed, follow), `ListAnnotations`, `GetStepSummaries`, `CancelRun`, `RerunRun`, `DispatchWorkflow`, `ListChecks`, `ListRunners`, `RemoveRunner` | | |
| 13 | + | | `RunService` | `ListRuns`, `GetRun`, `GetJob`, `GetJobLog` (streamed, follow), `ListAnnotations`, `GetStepSummaries`, `CancelRun`, `RerunRun`, `DispatchWorkflow`, `ListWorkflows`, `DisableWorkflow`, `EnableWorkflow`, `ListChecks`, `ListRunners`, `RemoveRunner` | | |
| 14 | 14 | | `RunnerService` | `RegisterRunner`, `FetchJob` (long poll), `UpdateJob`, `AppendLog` (offset-idempotent), `Heartbeat`, `WatchJob` (cancel requests, streamed), `CompleteJob` (idempotent), `ResolveActions`, `UploadSummary` | | |
| 15 | 15 | | `SecretService` | `SetSecret`, `ListSecrets` (names only), `DeleteSecret`. Scopes: instance, repository, environment | | |
| 16 | 16 | | `VariableService` | `SetVariable`, `GetVariable`, `ListVariables`, `DeleteVariable`. Same scopes | | |
| @@ -10,7 +10,7 @@ | |||||
| 10 | | `EventService` | `Watch` (streamed, resumable) | | 10 | | `EventService` | `Watch` (streamed, resumable) | | ||
| 11 | | `ServerService` | `GetVersion` (version and features), `GetSigningKey`, `RotateOIDCKey` (owner only) | | 11 | | `ServerService` | `GetVersion` (version and features), `GetSigningKey`, `RotateOIDCKey` (owner only) | | ||
| 12 | | `TrustedKeyService` | `ListTrustedKeys`, `AddTrustedKey` and `RemoveTrustedKey` (owner only). `Commit.verification` carries the result of the check (feature `commit_signatures`) | | 12 | | `TrustedKeyService` | `ListTrustedKeys`, `AddTrustedKey` and `RemoveTrustedKey` (owner only). `Commit.verification` carries the result of the check (feature `commit_signatures`) | | ||
| 13 | - | | `RunService` | `ListRuns`, `GetRun`, `GetJob`, `GetJobLog` (streamed, follow), `ListAnnotations`, `GetStepSummaries`, `CancelRun`, `RerunRun`, `DispatchWorkflow`, `ListChecks`, `ListRunners`, `RemoveRunner` | | 13 | + | | `RunService` | `ListRuns`, `GetRun`, `GetJob`, `GetJobLog` (streamed, follow), `ListAnnotations`, `GetStepSummaries`, `CancelRun`, `RerunRun`, `DispatchWorkflow`, `ListWorkflows`, `DisableWorkflow`, `EnableWorkflow`, `ListChecks`, `ListRunners`, `RemoveRunner` | |
| 14 | | `RunnerService` | `RegisterRunner`, `FetchJob` (long poll), `UpdateJob`, `AppendLog` (offset-idempotent), `Heartbeat`, `WatchJob` (cancel requests, streamed), `CompleteJob` (idempotent), `ResolveActions`, `UploadSummary` | | 14 | | `RunnerService` | `RegisterRunner`, `FetchJob` (long poll), `UpdateJob`, `AppendLog` (offset-idempotent), `Heartbeat`, `WatchJob` (cancel requests, streamed), `CompleteJob` (idempotent), `ResolveActions`, `UploadSummary` | | ||
| 15 | | `SecretService` | `SetSecret`, `ListSecrets` (names only), `DeleteSecret`. Scopes: instance, repository, environment | | 15 | | `SecretService` | `SetSecret`, `ListSecrets` (names only), `DeleteSecret`. Scopes: instance, repository, environment | | ||
| 16 | | `VariableService` | `SetVariable`, `GetVariable`, `ListVariables`, `DeleteVariable`. Same scopes | | 16 | | `VariableService` | `SetVariable`, `GetVariable`, `ListVariables`, `DeleteVariable`. Same scopes | | ||
M gen/ermite/ermiteconnect/run.connect.go +141 -0
| @@ -56,6 +56,15 @@ const ( | |||
| 56 | 56 | // RunServiceDispatchWorkflowProcedure is the fully-qualified name of the RunService's | |
| 57 | 57 | // DispatchWorkflow RPC. | |
| 58 | 58 | RunServiceDispatchWorkflowProcedure = "/ermite.RunService/DispatchWorkflow" | |
| 59 | + | // RunServiceListWorkflowsProcedure is the fully-qualified name of the RunService's ListWorkflows | |
| 60 | + | // RPC. | |
| 61 | + | RunServiceListWorkflowsProcedure = "/ermite.RunService/ListWorkflows" | |
| 62 | + | // RunServiceDisableWorkflowProcedure is the fully-qualified name of the RunService's | |
| 63 | + | // DisableWorkflow RPC. | |
| 64 | + | RunServiceDisableWorkflowProcedure = "/ermite.RunService/DisableWorkflow" | |
| 65 | + | // RunServiceEnableWorkflowProcedure is the fully-qualified name of the RunService's EnableWorkflow | |
| 66 | + | // RPC. | |
| 67 | + | RunServiceEnableWorkflowProcedure = "/ermite.RunService/EnableWorkflow" | |
| 59 | 68 | // RunServiceListChecksProcedure is the fully-qualified name of the RunService's ListChecks RPC. | |
| 60 | 69 | RunServiceListChecksProcedure = "/ermite.RunService/ListChecks" | |
| 61 | 70 | // RunServiceListRunnersProcedure is the fully-qualified name of the RunService's ListRunners RPC. | |
| @@ -145,6 +154,36 @@ type RunServiceClient interface { | |||
| 145 | 154 | // missing while required without default, or has a value of the wrong type | |
| 146 | 155 | // or outside its choices, or if the workflow file is not valid. | |
| 147 | 156 | DispatchWorkflow(context.Context, *connect.Request[ermite.DispatchWorkflowRequest]) (*connect.Response[ermite.DispatchWorkflowResponse], error) | |
| 157 | + | // ListWorkflows lists the workflow files of a repository with their state, | |
| 158 | + | // like `gh workflow list --all`, ordered by path: the files of | |
| 159 | + | // .github/workflows at the tip of the default branch, and the files that are | |
| 160 | + | // disabled even if the default branch has no such file (a repository that | |
| 161 | + | // is empty, or a file not pushed yet). Needs the same access as reading the | |
| 162 | + | // repository. A repository without a default branch lists only its disabled | |
| 163 | + | // files. Only servers with the feature "ci.workflows" implement it | |
| 164 | + | // (unimplemented otherwise). Fails with not_found if the repository does not | |
| 165 | + | // exist or cannot be read. | |
| 166 | + | ListWorkflows(context.Context, *connect.Request[ermite.ListWorkflowsRequest]) (*connect.Response[ermite.ListWorkflowsResponse], error) | |
| 167 | + | // DisableWorkflow disables a workflow file of a repository, like `gh | |
| 168 | + | // workflow disable`: no event starts a run of it any more (push, | |
| 169 | + | // pull_request, pull_request_target, schedule, workflow_run, create, | |
| 170 | + | // delete, and workflow_dispatch). Runs already started are not affected. | |
| 171 | + | // The state belongs to the repository and to the file path, not to a | |
| 172 | + | // commit or a branch, and the file does not have to exist: it can be set on | |
| 173 | + | // an empty repository, before the first push. Disabling a disabled workflow | |
| 174 | + | // succeeds and changes nothing. Needs the repo:admin scope on the | |
| 175 | + | // repository, and a token that is not limited to branch prefixes. Only | |
| 176 | + | // servers with the feature "ci.workflows" implement it (unimplemented | |
| 177 | + | // otherwise). Fails with not_found if the repository does not exist or the | |
| 178 | + | // caller cannot read it, permission_denied without the scope, and | |
| 179 | + | // invalid_argument if the workflow is not a file name or a path of | |
| 180 | + | // .github/workflows ending in .yml or .yaml. | |
| 181 | + | DisableWorkflow(context.Context, *connect.Request[ermite.DisableWorkflowRequest]) (*connect.Response[ermite.DisableWorkflowResponse], error) | |
| 182 | + | // EnableWorkflow undoes DisableWorkflow, like `gh workflow enable`. Enabling | |
| 183 | + | // a workflow that is not disabled succeeds and changes nothing. Same access | |
| 184 | + | // and errors as DisableWorkflow. Events that happened while the workflow was | |
| 185 | + | // disabled are not replayed. | |
| 186 | + | EnableWorkflow(context.Context, *connect.Request[ermite.EnableWorkflowRequest]) (*connect.Response[ermite.EnableWorkflowResponse], error) | |
| 148 | 187 | // ListChecks lists the checks of a commit: for each job of each run on that | |
| 149 | 188 | // sha, the one of the latest attempt, ordered by creation time then name. | |
| 150 | 189 | // A commit without a run has no check: the list is empty, which is not an | |
| @@ -227,6 +266,24 @@ func NewRunServiceClient(httpClient connect.HTTPClient, baseURL string, opts ... | |||
| 227 | 266 | connect.WithSchema(runServiceMethods.ByName("DispatchWorkflow")), | |
| 228 | 267 | connect.WithClientOptions(opts...), | |
| 229 | 268 | ), | |
| 269 | + | listWorkflows: connect.NewClient[ermite.ListWorkflowsRequest, ermite.ListWorkflowsResponse]( | |
| 270 | + | httpClient, | |
| 271 | + | baseURL+RunServiceListWorkflowsProcedure, | |
| 272 | + | connect.WithSchema(runServiceMethods.ByName("ListWorkflows")), | |
| 273 | + | connect.WithClientOptions(opts...), | |
| 274 | + | ), | |
| 275 | + | disableWorkflow: connect.NewClient[ermite.DisableWorkflowRequest, ermite.DisableWorkflowResponse]( | |
| 276 | + | httpClient, | |
| 277 | + | baseURL+RunServiceDisableWorkflowProcedure, | |
| 278 | + | connect.WithSchema(runServiceMethods.ByName("DisableWorkflow")), | |
| 279 | + | connect.WithClientOptions(opts...), | |
| 280 | + | ), | |
| 281 | + | enableWorkflow: connect.NewClient[ermite.EnableWorkflowRequest, ermite.EnableWorkflowResponse]( | |
| 282 | + | httpClient, | |
| 283 | + | baseURL+RunServiceEnableWorkflowProcedure, | |
| 284 | + | connect.WithSchema(runServiceMethods.ByName("EnableWorkflow")), | |
| 285 | + | connect.WithClientOptions(opts...), | |
| 286 | + | ), | |
| 230 | 287 | listChecks: connect.NewClient[ermite.ListChecksRequest, ermite.ListChecksResponse]( | |
| 231 | 288 | httpClient, | |
| 232 | 289 | baseURL+RunServiceListChecksProcedure, | |
| @@ -259,6 +316,9 @@ type runServiceClient struct { | |||
| 259 | 316 | cancelRun *connect.Client[ermite.CancelRunRequest, ermite.CancelRunResponse] | |
| 260 | 317 | rerunRun *connect.Client[ermite.RerunRunRequest, ermite.RerunRunResponse] | |
| 261 | 318 | dispatchWorkflow *connect.Client[ermite.DispatchWorkflowRequest, ermite.DispatchWorkflowResponse] | |
| 319 | + | listWorkflows *connect.Client[ermite.ListWorkflowsRequest, ermite.ListWorkflowsResponse] | |
| 320 | + | disableWorkflow *connect.Client[ermite.DisableWorkflowRequest, ermite.DisableWorkflowResponse] | |
| 321 | + | enableWorkflow *connect.Client[ermite.EnableWorkflowRequest, ermite.EnableWorkflowResponse] | |
| 262 | 322 | listChecks *connect.Client[ermite.ListChecksRequest, ermite.ListChecksResponse] | |
| 263 | 323 | listRunners *connect.Client[ermite.ListRunnersRequest, ermite.ListRunnersResponse] | |
| 264 | 324 | removeRunner *connect.Client[ermite.RemoveRunnerRequest, ermite.RemoveRunnerResponse] | |
| @@ -309,6 +369,21 @@ func (c *runServiceClient) DispatchWorkflow(ctx context.Context, req *connect.Re | |||
| 309 | 369 | return c.dispatchWorkflow.CallUnary(ctx, req) | |
| 310 | 370 | } | |
| 311 | 371 | ||
| 372 | + | // ListWorkflows calls ermite.RunService.ListWorkflows. | |
| 373 | + | func (c *runServiceClient) ListWorkflows(ctx context.Context, req *connect.Request[ermite.ListWorkflowsRequest]) (*connect.Response[ermite.ListWorkflowsResponse], error) { | |
| 374 | + | return c.listWorkflows.CallUnary(ctx, req) | |
| 375 | + | } | |
| 376 | + | ||
| 377 | + | // DisableWorkflow calls ermite.RunService.DisableWorkflow. | |
| 378 | + | func (c *runServiceClient) DisableWorkflow(ctx context.Context, req *connect.Request[ermite.DisableWorkflowRequest]) (*connect.Response[ermite.DisableWorkflowResponse], error) { | |
| 379 | + | return c.disableWorkflow.CallUnary(ctx, req) | |
| 380 | + | } | |
| 381 | + | ||
| 382 | + | // EnableWorkflow calls ermite.RunService.EnableWorkflow. | |
| 383 | + | func (c *runServiceClient) EnableWorkflow(ctx context.Context, req *connect.Request[ermite.EnableWorkflowRequest]) (*connect.Response[ermite.EnableWorkflowResponse], error) { | |
| 384 | + | return c.enableWorkflow.CallUnary(ctx, req) | |
| 385 | + | } | |
| 386 | + | ||
| 312 | 387 | // ListChecks calls ermite.RunService.ListChecks. | |
| 313 | 388 | func (c *runServiceClient) ListChecks(ctx context.Context, req *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error) { | |
| 314 | 389 | return c.listChecks.CallUnary(ctx, req) | |
| @@ -405,6 +480,36 @@ type RunServiceHandler interface { | |||
| 405 | 480 | // missing while required without default, or has a value of the wrong type | |
| 406 | 481 | // or outside its choices, or if the workflow file is not valid. | |
| 407 | 482 | DispatchWorkflow(context.Context, *connect.Request[ermite.DispatchWorkflowRequest]) (*connect.Response[ermite.DispatchWorkflowResponse], error) | |
| 483 | + | // ListWorkflows lists the workflow files of a repository with their state, | |
| 484 | + | // like `gh workflow list --all`, ordered by path: the files of | |
| 485 | + | // .github/workflows at the tip of the default branch, and the files that are | |
| 486 | + | // disabled even if the default branch has no such file (a repository that | |
| 487 | + | // is empty, or a file not pushed yet). Needs the same access as reading the | |
| 488 | + | // repository. A repository without a default branch lists only its disabled | |
| 489 | + | // files. Only servers with the feature "ci.workflows" implement it | |
| 490 | + | // (unimplemented otherwise). Fails with not_found if the repository does not | |
| 491 | + | // exist or cannot be read. | |
| 492 | + | ListWorkflows(context.Context, *connect.Request[ermite.ListWorkflowsRequest]) (*connect.Response[ermite.ListWorkflowsResponse], error) | |
| 493 | + | // DisableWorkflow disables a workflow file of a repository, like `gh | |
| 494 | + | // workflow disable`: no event starts a run of it any more (push, | |
| 495 | + | // pull_request, pull_request_target, schedule, workflow_run, create, | |
| 496 | + | // delete, and workflow_dispatch). Runs already started are not affected. | |
| 497 | + | // The state belongs to the repository and to the file path, not to a | |
| 498 | + | // commit or a branch, and the file does not have to exist: it can be set on | |
| 499 | + | // an empty repository, before the first push. Disabling a disabled workflow | |
| 500 | + | // succeeds and changes nothing. Needs the repo:admin scope on the | |
| 501 | + | // repository, and a token that is not limited to branch prefixes. Only | |
| 502 | + | // servers with the feature "ci.workflows" implement it (unimplemented | |
| 503 | + | // otherwise). Fails with not_found if the repository does not exist or the | |
| 504 | + | // caller cannot read it, permission_denied without the scope, and | |
| 505 | + | // invalid_argument if the workflow is not a file name or a path of | |
| 506 | + | // .github/workflows ending in .yml or .yaml. | |
| 507 | + | DisableWorkflow(context.Context, *connect.Request[ermite.DisableWorkflowRequest]) (*connect.Response[ermite.DisableWorkflowResponse], error) | |
| 508 | + | // EnableWorkflow undoes DisableWorkflow, like `gh workflow enable`. Enabling | |
| 509 | + | // a workflow that is not disabled succeeds and changes nothing. Same access | |
| 510 | + | // and errors as DisableWorkflow. Events that happened while the workflow was | |
| 511 | + | // disabled are not replayed. | |
| 512 | + | EnableWorkflow(context.Context, *connect.Request[ermite.EnableWorkflowRequest]) (*connect.Response[ermite.EnableWorkflowResponse], error) | |
| 408 | 513 | // ListChecks lists the checks of a commit: for each job of each run on that | |
| 409 | 514 | // sha, the one of the latest attempt, ordered by creation time then name. | |
| 410 | 515 | // A commit without a run has no check: the list is empty, which is not an | |
| @@ -483,6 +588,24 @@ func NewRunServiceHandler(svc RunServiceHandler, opts ...connect.HandlerOption) | |||
| 483 | 588 | connect.WithSchema(runServiceMethods.ByName("DispatchWorkflow")), | |
| 484 | 589 | connect.WithHandlerOptions(opts...), | |
| 485 | 590 | ) | |
| 591 | + | runServiceListWorkflowsHandler := connect.NewUnaryHandler( | |
| 592 | + | RunServiceListWorkflowsProcedure, | |
| 593 | + | svc.ListWorkflows, | |
| 594 | + | connect.WithSchema(runServiceMethods.ByName("ListWorkflows")), | |
| 595 | + | connect.WithHandlerOptions(opts...), | |
| 596 | + | ) | |
| 597 | + | runServiceDisableWorkflowHandler := connect.NewUnaryHandler( | |
| 598 | + | RunServiceDisableWorkflowProcedure, | |
| 599 | + | svc.DisableWorkflow, | |
| 600 | + | connect.WithSchema(runServiceMethods.ByName("DisableWorkflow")), | |
| 601 | + | connect.WithHandlerOptions(opts...), | |
| 602 | + | ) | |
| 603 | + | runServiceEnableWorkflowHandler := connect.NewUnaryHandler( | |
| 604 | + | RunServiceEnableWorkflowProcedure, | |
| 605 | + | svc.EnableWorkflow, | |
| 606 | + | connect.WithSchema(runServiceMethods.ByName("EnableWorkflow")), | |
| 607 | + | connect.WithHandlerOptions(opts...), | |
| 608 | + | ) | |
| 486 | 609 | runServiceListChecksHandler := connect.NewUnaryHandler( | |
| 487 | 610 | RunServiceListChecksProcedure, | |
| 488 | 611 | svc.ListChecks, | |
| @@ -521,6 +644,12 @@ func NewRunServiceHandler(svc RunServiceHandler, opts ...connect.HandlerOption) | |||
| 521 | 644 | runServiceRerunRunHandler.ServeHTTP(w, r) | |
| 522 | 645 | case RunServiceDispatchWorkflowProcedure: | |
| 523 | 646 | runServiceDispatchWorkflowHandler.ServeHTTP(w, r) | |
| 647 | + | case RunServiceListWorkflowsProcedure: | |
| 648 | + | runServiceListWorkflowsHandler.ServeHTTP(w, r) | |
| 649 | + | case RunServiceDisableWorkflowProcedure: | |
| 650 | + | runServiceDisableWorkflowHandler.ServeHTTP(w, r) | |
| 651 | + | case RunServiceEnableWorkflowProcedure: | |
| 652 | + | runServiceEnableWorkflowHandler.ServeHTTP(w, r) | |
| 524 | 653 | case RunServiceListChecksProcedure: | |
| 525 | 654 | runServiceListChecksHandler.ServeHTTP(w, r) | |
| 526 | 655 | case RunServiceListRunnersProcedure: | |
| @@ -572,6 +701,18 @@ func (UnimplementedRunServiceHandler) DispatchWorkflow(context.Context, *connect | |||
| 572 | 701 | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.DispatchWorkflow is not implemented")) | |
| 573 | 702 | } | |
| 574 | 703 | ||
| 704 | + | func (UnimplementedRunServiceHandler) ListWorkflows(context.Context, *connect.Request[ermite.ListWorkflowsRequest]) (*connect.Response[ermite.ListWorkflowsResponse], error) { | |
| 705 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.ListWorkflows is not implemented")) | |
| 706 | + | } | |
| 707 | + | ||
| 708 | + | func (UnimplementedRunServiceHandler) DisableWorkflow(context.Context, *connect.Request[ermite.DisableWorkflowRequest]) (*connect.Response[ermite.DisableWorkflowResponse], error) { | |
| 709 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.DisableWorkflow is not implemented")) | |
| 710 | + | } | |
| 711 | + | ||
| 712 | + | func (UnimplementedRunServiceHandler) EnableWorkflow(context.Context, *connect.Request[ermite.EnableWorkflowRequest]) (*connect.Response[ermite.EnableWorkflowResponse], error) { | |
| 713 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.EnableWorkflow is not implemented")) | |
| 714 | + | } | |
| 715 | + | ||
| 575 | 716 | func (UnimplementedRunServiceHandler) ListChecks(context.Context, *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error) { | |
| 576 | 717 | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.ListChecks is not implemented")) | |
| 577 | 718 | } | |
| @@ -56,6 +56,15 @@ const ( | |||||
| 56 | // RunServiceDispatchWorkflowProcedure is the fully-qualified name of the RunService's | 56 | // RunServiceDispatchWorkflowProcedure is the fully-qualified name of the RunService's | ||
| 57 | // DispatchWorkflow RPC. | 57 | // DispatchWorkflow RPC. | ||
| 58 | RunServiceDispatchWorkflowProcedure = "/ermite.RunService/DispatchWorkflow" | 58 | RunServiceDispatchWorkflowProcedure = "/ermite.RunService/DispatchWorkflow" | ||
| 59 | + | // RunServiceListWorkflowsProcedure is the fully-qualified name of the RunService's ListWorkflows | |||
| 60 | + | // RPC. | |||
| 61 | + | RunServiceListWorkflowsProcedure = "/ermite.RunService/ListWorkflows" | |||
| 62 | + | // RunServiceDisableWorkflowProcedure is the fully-qualified name of the RunService's | |||
| 63 | + | // DisableWorkflow RPC. | |||
| 64 | + | RunServiceDisableWorkflowProcedure = "/ermite.RunService/DisableWorkflow" | |||
| 65 | + | // RunServiceEnableWorkflowProcedure is the fully-qualified name of the RunService's EnableWorkflow | |||
| 66 | + | // RPC. | |||
| 67 | + | RunServiceEnableWorkflowProcedure = "/ermite.RunService/EnableWorkflow" | |||
| 59 | // RunServiceListChecksProcedure is the fully-qualified name of the RunService's ListChecks RPC. | 68 | // RunServiceListChecksProcedure is the fully-qualified name of the RunService's ListChecks RPC. | ||
| 60 | RunServiceListChecksProcedure = "/ermite.RunService/ListChecks" | 69 | RunServiceListChecksProcedure = "/ermite.RunService/ListChecks" | ||
| 61 | // RunServiceListRunnersProcedure is the fully-qualified name of the RunService's ListRunners RPC. | 70 | // RunServiceListRunnersProcedure is the fully-qualified name of the RunService's ListRunners RPC. | ||
| @@ -145,6 +154,36 @@ type RunServiceClient interface { | |||||
| 145 | // missing while required without default, or has a value of the wrong type | 154 | // missing while required without default, or has a value of the wrong type | ||
| 146 | // or outside its choices, or if the workflow file is not valid. | 155 | // or outside its choices, or if the workflow file is not valid. | ||
| 147 | DispatchWorkflow(context.Context, *connect.Request[ermite.DispatchWorkflowRequest]) (*connect.Response[ermite.DispatchWorkflowResponse], error) | 156 | DispatchWorkflow(context.Context, *connect.Request[ermite.DispatchWorkflowRequest]) (*connect.Response[ermite.DispatchWorkflowResponse], error) | ||
| 157 | + | // ListWorkflows lists the workflow files of a repository with their state, | |||
| 158 | + | // like `gh workflow list --all`, ordered by path: the files of | |||
| 159 | + | // .github/workflows at the tip of the default branch, and the files that are | |||
| 160 | + | // disabled even if the default branch has no such file (a repository that | |||
| 161 | + | // is empty, or a file not pushed yet). Needs the same access as reading the | |||
| 162 | + | // repository. A repository without a default branch lists only its disabled | |||
| 163 | + | // files. Only servers with the feature "ci.workflows" implement it | |||
| 164 | + | // (unimplemented otherwise). Fails with not_found if the repository does not | |||
| 165 | + | // exist or cannot be read. | |||
| 166 | + | ListWorkflows(context.Context, *connect.Request[ermite.ListWorkflowsRequest]) (*connect.Response[ermite.ListWorkflowsResponse], error) | |||
| 167 | + | // DisableWorkflow disables a workflow file of a repository, like `gh | |||
| 168 | + | // workflow disable`: no event starts a run of it any more (push, | |||
| 169 | + | // pull_request, pull_request_target, schedule, workflow_run, create, | |||
| 170 | + | // delete, and workflow_dispatch). Runs already started are not affected. | |||
| 171 | + | // The state belongs to the repository and to the file path, not to a | |||
| 172 | + | // commit or a branch, and the file does not have to exist: it can be set on | |||
| 173 | + | // an empty repository, before the first push. Disabling a disabled workflow | |||
| 174 | + | // succeeds and changes nothing. Needs the repo:admin scope on the | |||
| 175 | + | // repository, and a token that is not limited to branch prefixes. Only | |||
| 176 | + | // servers with the feature "ci.workflows" implement it (unimplemented | |||
| 177 | + | // otherwise). Fails with not_found if the repository does not exist or the | |||
| 178 | + | // caller cannot read it, permission_denied without the scope, and | |||
| 179 | + | // invalid_argument if the workflow is not a file name or a path of | |||
| 180 | + | // .github/workflows ending in .yml or .yaml. | |||
| 181 | + | DisableWorkflow(context.Context, *connect.Request[ermite.DisableWorkflowRequest]) (*connect.Response[ermite.DisableWorkflowResponse], error) | |||
| 182 | + | // EnableWorkflow undoes DisableWorkflow, like `gh workflow enable`. Enabling | |||
| 183 | + | // a workflow that is not disabled succeeds and changes nothing. Same access | |||
| 184 | + | // and errors as DisableWorkflow. Events that happened while the workflow was | |||
| 185 | + | // disabled are not replayed. | |||
| 186 | + | EnableWorkflow(context.Context, *connect.Request[ermite.EnableWorkflowRequest]) (*connect.Response[ermite.EnableWorkflowResponse], error) | |||
| 148 | // ListChecks lists the checks of a commit: for each job of each run on that | 187 | // ListChecks lists the checks of a commit: for each job of each run on that | ||
| 149 | // sha, the one of the latest attempt, ordered by creation time then name. | 188 | // sha, the one of the latest attempt, ordered by creation time then name. | ||
| 150 | // A commit without a run has no check: the list is empty, which is not an | 189 | // A commit without a run has no check: the list is empty, which is not an | ||
| @@ -227,6 +266,24 @@ func NewRunServiceClient(httpClient connect.HTTPClient, baseURL string, opts ... | |||||
| 227 | connect.WithSchema(runServiceMethods.ByName("DispatchWorkflow")), | 266 | connect.WithSchema(runServiceMethods.ByName("DispatchWorkflow")), | ||
| 228 | connect.WithClientOptions(opts...), | 267 | connect.WithClientOptions(opts...), | ||
| 229 | ), | 268 | ), | ||
| 269 | + | listWorkflows: connect.NewClient[ermite.ListWorkflowsRequest, ermite.ListWorkflowsResponse]( | |||
| 270 | + | httpClient, | |||
| 271 | + | baseURL+RunServiceListWorkflowsProcedure, | |||
| 272 | + | connect.WithSchema(runServiceMethods.ByName("ListWorkflows")), | |||
| 273 | + | connect.WithClientOptions(opts...), | |||
| 274 | + | ), | |||
| 275 | + | disableWorkflow: connect.NewClient[ermite.DisableWorkflowRequest, ermite.DisableWorkflowResponse]( | |||
| 276 | + | httpClient, | |||
| 277 | + | baseURL+RunServiceDisableWorkflowProcedure, | |||
| 278 | + | connect.WithSchema(runServiceMethods.ByName("DisableWorkflow")), | |||
| 279 | + | connect.WithClientOptions(opts...), | |||
| 280 | + | ), | |||
| 281 | + | enableWorkflow: connect.NewClient[ermite.EnableWorkflowRequest, ermite.EnableWorkflowResponse]( | |||
| 282 | + | httpClient, | |||
| 283 | + | baseURL+RunServiceEnableWorkflowProcedure, | |||
| 284 | + | connect.WithSchema(runServiceMethods.ByName("EnableWorkflow")), | |||
| 285 | + | connect.WithClientOptions(opts...), | |||
| 286 | + | ), | |||
| 230 | listChecks: connect.NewClient[ermite.ListChecksRequest, ermite.ListChecksResponse]( | 287 | listChecks: connect.NewClient[ermite.ListChecksRequest, ermite.ListChecksResponse]( | ||
| 231 | httpClient, | 288 | httpClient, | ||
| 232 | baseURL+RunServiceListChecksProcedure, | 289 | baseURL+RunServiceListChecksProcedure, | ||
| @@ -259,6 +316,9 @@ type runServiceClient struct { | |||||
| 259 | cancelRun *connect.Client[ermite.CancelRunRequest, ermite.CancelRunResponse] | 316 | cancelRun *connect.Client[ermite.CancelRunRequest, ermite.CancelRunResponse] | ||
| 260 | rerunRun *connect.Client[ermite.RerunRunRequest, ermite.RerunRunResponse] | 317 | rerunRun *connect.Client[ermite.RerunRunRequest, ermite.RerunRunResponse] | ||
| 261 | dispatchWorkflow *connect.Client[ermite.DispatchWorkflowRequest, ermite.DispatchWorkflowResponse] | 318 | dispatchWorkflow *connect.Client[ermite.DispatchWorkflowRequest, ermite.DispatchWorkflowResponse] | ||
| 319 | + | listWorkflows *connect.Client[ermite.ListWorkflowsRequest, ermite.ListWorkflowsResponse] | |||
| 320 | + | disableWorkflow *connect.Client[ermite.DisableWorkflowRequest, ermite.DisableWorkflowResponse] | |||
| 321 | + | enableWorkflow *connect.Client[ermite.EnableWorkflowRequest, ermite.EnableWorkflowResponse] | |||
| 262 | listChecks *connect.Client[ermite.ListChecksRequest, ermite.ListChecksResponse] | 322 | listChecks *connect.Client[ermite.ListChecksRequest, ermite.ListChecksResponse] | ||
| 263 | listRunners *connect.Client[ermite.ListRunnersRequest, ermite.ListRunnersResponse] | 323 | listRunners *connect.Client[ermite.ListRunnersRequest, ermite.ListRunnersResponse] | ||
| 264 | removeRunner *connect.Client[ermite.RemoveRunnerRequest, ermite.RemoveRunnerResponse] | 324 | removeRunner *connect.Client[ermite.RemoveRunnerRequest, ermite.RemoveRunnerResponse] | ||
| @@ -309,6 +369,21 @@ func (c *runServiceClient) DispatchWorkflow(ctx context.Context, req *connect.Re | |||||
| 309 | return c.dispatchWorkflow.CallUnary(ctx, req) | 369 | return c.dispatchWorkflow.CallUnary(ctx, req) | ||
| 310 | } | 370 | } | ||
| 311 | 371 | ||||
| 372 | + | // ListWorkflows calls ermite.RunService.ListWorkflows. | |||
| 373 | + | func (c *runServiceClient) ListWorkflows(ctx context.Context, req *connect.Request[ermite.ListWorkflowsRequest]) (*connect.Response[ermite.ListWorkflowsResponse], error) { | |||
| 374 | + | return c.listWorkflows.CallUnary(ctx, req) | |||
| 375 | + | } | |||
| 376 | + | ||||
| 377 | + | // DisableWorkflow calls ermite.RunService.DisableWorkflow. | |||
| 378 | + | func (c *runServiceClient) DisableWorkflow(ctx context.Context, req *connect.Request[ermite.DisableWorkflowRequest]) (*connect.Response[ermite.DisableWorkflowResponse], error) { | |||
| 379 | + | return c.disableWorkflow.CallUnary(ctx, req) | |||
| 380 | + | } | |||
| 381 | + | ||||
| 382 | + | // EnableWorkflow calls ermite.RunService.EnableWorkflow. | |||
| 383 | + | func (c *runServiceClient) EnableWorkflow(ctx context.Context, req *connect.Request[ermite.EnableWorkflowRequest]) (*connect.Response[ermite.EnableWorkflowResponse], error) { | |||
| 384 | + | return c.enableWorkflow.CallUnary(ctx, req) | |||
| 385 | + | } | |||
| 386 | + | ||||
| 312 | // ListChecks calls ermite.RunService.ListChecks. | 387 | // ListChecks calls ermite.RunService.ListChecks. | ||
| 313 | func (c *runServiceClient) ListChecks(ctx context.Context, req *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error) { | 388 | func (c *runServiceClient) ListChecks(ctx context.Context, req *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error) { | ||
| 314 | return c.listChecks.CallUnary(ctx, req) | 389 | return c.listChecks.CallUnary(ctx, req) | ||
| @@ -405,6 +480,36 @@ type RunServiceHandler interface { | |||||
| 405 | // missing while required without default, or has a value of the wrong type | 480 | // missing while required without default, or has a value of the wrong type | ||
| 406 | // or outside its choices, or if the workflow file is not valid. | 481 | // or outside its choices, or if the workflow file is not valid. | ||
| 407 | DispatchWorkflow(context.Context, *connect.Request[ermite.DispatchWorkflowRequest]) (*connect.Response[ermite.DispatchWorkflowResponse], error) | 482 | DispatchWorkflow(context.Context, *connect.Request[ermite.DispatchWorkflowRequest]) (*connect.Response[ermite.DispatchWorkflowResponse], error) | ||
| 483 | + | // ListWorkflows lists the workflow files of a repository with their state, | |||
| 484 | + | // like `gh workflow list --all`, ordered by path: the files of | |||
| 485 | + | // .github/workflows at the tip of the default branch, and the files that are | |||
| 486 | + | // disabled even if the default branch has no such file (a repository that | |||
| 487 | + | // is empty, or a file not pushed yet). Needs the same access as reading the | |||
| 488 | + | // repository. A repository without a default branch lists only its disabled | |||
| 489 | + | // files. Only servers with the feature "ci.workflows" implement it | |||
| 490 | + | // (unimplemented otherwise). Fails with not_found if the repository does not | |||
| 491 | + | // exist or cannot be read. | |||
| 492 | + | ListWorkflows(context.Context, *connect.Request[ermite.ListWorkflowsRequest]) (*connect.Response[ermite.ListWorkflowsResponse], error) | |||
| 493 | + | // DisableWorkflow disables a workflow file of a repository, like `gh | |||
| 494 | + | // workflow disable`: no event starts a run of it any more (push, | |||
| 495 | + | // pull_request, pull_request_target, schedule, workflow_run, create, | |||
| 496 | + | // delete, and workflow_dispatch). Runs already started are not affected. | |||
| 497 | + | // The state belongs to the repository and to the file path, not to a | |||
| 498 | + | // commit or a branch, and the file does not have to exist: it can be set on | |||
| 499 | + | // an empty repository, before the first push. Disabling a disabled workflow | |||
| 500 | + | // succeeds and changes nothing. Needs the repo:admin scope on the | |||
| 501 | + | // repository, and a token that is not limited to branch prefixes. Only | |||
| 502 | + | // servers with the feature "ci.workflows" implement it (unimplemented | |||
| 503 | + | // otherwise). Fails with not_found if the repository does not exist or the | |||
| 504 | + | // caller cannot read it, permission_denied without the scope, and | |||
| 505 | + | // invalid_argument if the workflow is not a file name or a path of | |||
| 506 | + | // .github/workflows ending in .yml or .yaml. | |||
| 507 | + | DisableWorkflow(context.Context, *connect.Request[ermite.DisableWorkflowRequest]) (*connect.Response[ermite.DisableWorkflowResponse], error) | |||
| 508 | + | // EnableWorkflow undoes DisableWorkflow, like `gh workflow enable`. Enabling | |||
| 509 | + | // a workflow that is not disabled succeeds and changes nothing. Same access | |||
| 510 | + | // and errors as DisableWorkflow. Events that happened while the workflow was | |||
| 511 | + | // disabled are not replayed. | |||
| 512 | + | EnableWorkflow(context.Context, *connect.Request[ermite.EnableWorkflowRequest]) (*connect.Response[ermite.EnableWorkflowResponse], error) | |||
| 408 | // ListChecks lists the checks of a commit: for each job of each run on that | 513 | // ListChecks lists the checks of a commit: for each job of each run on that | ||
| 409 | // sha, the one of the latest attempt, ordered by creation time then name. | 514 | // sha, the one of the latest attempt, ordered by creation time then name. | ||
| 410 | // A commit without a run has no check: the list is empty, which is not an | 515 | // A commit without a run has no check: the list is empty, which is not an | ||
| @@ -483,6 +588,24 @@ func NewRunServiceHandler(svc RunServiceHandler, opts ...connect.HandlerOption) | |||||
| 483 | connect.WithSchema(runServiceMethods.ByName("DispatchWorkflow")), | 588 | connect.WithSchema(runServiceMethods.ByName("DispatchWorkflow")), | ||
| 484 | connect.WithHandlerOptions(opts...), | 589 | connect.WithHandlerOptions(opts...), | ||
| 485 | ) | 590 | ) | ||
| 591 | + | runServiceListWorkflowsHandler := connect.NewUnaryHandler( | |||
| 592 | + | RunServiceListWorkflowsProcedure, | |||
| 593 | + | svc.ListWorkflows, | |||
| 594 | + | connect.WithSchema(runServiceMethods.ByName("ListWorkflows")), | |||
| 595 | + | connect.WithHandlerOptions(opts...), | |||
| 596 | + | ) | |||
| 597 | + | runServiceDisableWorkflowHandler := connect.NewUnaryHandler( | |||
| 598 | + | RunServiceDisableWorkflowProcedure, | |||
| 599 | + | svc.DisableWorkflow, | |||
| 600 | + | connect.WithSchema(runServiceMethods.ByName("DisableWorkflow")), | |||
| 601 | + | connect.WithHandlerOptions(opts...), | |||
| 602 | + | ) | |||
| 603 | + | runServiceEnableWorkflowHandler := connect.NewUnaryHandler( | |||
| 604 | + | RunServiceEnableWorkflowProcedure, | |||
| 605 | + | svc.EnableWorkflow, | |||
| 606 | + | connect.WithSchema(runServiceMethods.ByName("EnableWorkflow")), | |||
| 607 | + | connect.WithHandlerOptions(opts...), | |||
| 608 | + | ) | |||
| 486 | runServiceListChecksHandler := connect.NewUnaryHandler( | 609 | runServiceListChecksHandler := connect.NewUnaryHandler( | ||
| 487 | RunServiceListChecksProcedure, | 610 | RunServiceListChecksProcedure, | ||
| 488 | svc.ListChecks, | 611 | svc.ListChecks, | ||
| @@ -521,6 +644,12 @@ func NewRunServiceHandler(svc RunServiceHandler, opts ...connect.HandlerOption) | |||||
| 521 | runServiceRerunRunHandler.ServeHTTP(w, r) | 644 | runServiceRerunRunHandler.ServeHTTP(w, r) | ||
| 522 | case RunServiceDispatchWorkflowProcedure: | 645 | case RunServiceDispatchWorkflowProcedure: | ||
| 523 | runServiceDispatchWorkflowHandler.ServeHTTP(w, r) | 646 | runServiceDispatchWorkflowHandler.ServeHTTP(w, r) | ||
| 647 | + | case RunServiceListWorkflowsProcedure: | |||
| 648 | + | runServiceListWorkflowsHandler.ServeHTTP(w, r) | |||
| 649 | + | case RunServiceDisableWorkflowProcedure: | |||
| 650 | + | runServiceDisableWorkflowHandler.ServeHTTP(w, r) | |||
| 651 | + | case RunServiceEnableWorkflowProcedure: | |||
| 652 | + | runServiceEnableWorkflowHandler.ServeHTTP(w, r) | |||
| 524 | case RunServiceListChecksProcedure: | 653 | case RunServiceListChecksProcedure: | ||
| 525 | runServiceListChecksHandler.ServeHTTP(w, r) | 654 | runServiceListChecksHandler.ServeHTTP(w, r) | ||
| 526 | case RunServiceListRunnersProcedure: | 655 | case RunServiceListRunnersProcedure: | ||
| @@ -572,6 +701,18 @@ func (UnimplementedRunServiceHandler) DispatchWorkflow(context.Context, *connect | |||||
| 572 | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.DispatchWorkflow is not implemented")) | 701 | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.DispatchWorkflow is not implemented")) | ||
| 573 | } | 702 | } | ||
| 574 | 703 | ||||
| 704 | + | func (UnimplementedRunServiceHandler) ListWorkflows(context.Context, *connect.Request[ermite.ListWorkflowsRequest]) (*connect.Response[ermite.ListWorkflowsResponse], error) { | |||
| 705 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.ListWorkflows is not implemented")) | |||
| 706 | + | } | |||
| 707 | + | ||||
| 708 | + | func (UnimplementedRunServiceHandler) DisableWorkflow(context.Context, *connect.Request[ermite.DisableWorkflowRequest]) (*connect.Response[ermite.DisableWorkflowResponse], error) { | |||
| 709 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.DisableWorkflow is not implemented")) | |||
| 710 | + | } | |||
| 711 | + | ||||
| 712 | + | func (UnimplementedRunServiceHandler) EnableWorkflow(context.Context, *connect.Request[ermite.EnableWorkflowRequest]) (*connect.Response[ermite.EnableWorkflowResponse], error) { | |||
| 713 | + | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.EnableWorkflow is not implemented")) | |||
| 714 | + | } | |||
| 715 | + | ||||
| 575 | func (UnimplementedRunServiceHandler) ListChecks(context.Context, *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error) { | 716 | func (UnimplementedRunServiceHandler) ListChecks(context.Context, *connect.Request[ermite.ListChecksRequest]) (*connect.Response[ermite.ListChecksResponse], error) { | ||
| 576 | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.ListChecks is not implemented")) | 717 | return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ermite.RunService.ListChecks is not implemented")) | ||
| 577 | } | 718 | } | ||
M gen/ermite/run.pb.go +571 -113
| @@ -24,6 +24,58 @@ const ( | |||
| 24 | 24 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | |
| 25 | 25 | ) | |
| 26 | 26 | ||
| 27 | + | // WorkflowState tells whether a workflow file starts runs. | |
| 28 | + | type WorkflowState int32 | |
| 29 | + | ||
| 30 | + | const ( | |
| 31 | + | WorkflowState_WORKFLOW_STATE_UNSPECIFIED WorkflowState = 0 | |
| 32 | + | // The workflow starts runs for the events it declares. | |
| 33 | + | WorkflowState_WORKFLOW_STATE_ENABLED WorkflowState = 1 | |
| 34 | + | // The workflow starts no run for any event (DisableWorkflow). | |
| 35 | + | WorkflowState_WORKFLOW_STATE_DISABLED WorkflowState = 2 | |
| 36 | + | ) | |
| 37 | + | ||
| 38 | + | // Enum value maps for WorkflowState. | |
| 39 | + | var ( | |
| 40 | + | WorkflowState_name = map[int32]string{ | |
| 41 | + | 0: "WORKFLOW_STATE_UNSPECIFIED", | |
| 42 | + | 1: "WORKFLOW_STATE_ENABLED", | |
| 43 | + | 2: "WORKFLOW_STATE_DISABLED", | |
| 44 | + | } | |
| 45 | + | WorkflowState_value = map[string]int32{ | |
| 46 | + | "WORKFLOW_STATE_UNSPECIFIED": 0, | |
| 47 | + | "WORKFLOW_STATE_ENABLED": 1, | |
| 48 | + | "WORKFLOW_STATE_DISABLED": 2, | |
| 49 | + | } | |
| 50 | + | ) | |
| 51 | + | ||
| 52 | + | func (x WorkflowState) Enum() *WorkflowState { | |
| 53 | + | p := new(WorkflowState) | |
| 54 | + | *p = x | |
| 55 | + | return p | |
| 56 | + | } | |
| 57 | + | ||
| 58 | + | func (x WorkflowState) String() string { | |
| 59 | + | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |
| 60 | + | } | |
| 61 | + | ||
| 62 | + | func (WorkflowState) Descriptor() protoreflect.EnumDescriptor { | |
| 63 | + | return file_ermite_run_proto_enumTypes[0].Descriptor() | |
| 64 | + | } | |
| 65 | + | ||
| 66 | + | func (WorkflowState) Type() protoreflect.EnumType { | |
| 67 | + | return &file_ermite_run_proto_enumTypes[0] | |
| 68 | + | } | |
| 69 | + | ||
| 70 | + | func (x WorkflowState) Number() protoreflect.EnumNumber { | |
| 71 | + | return protoreflect.EnumNumber(x) | |
| 72 | + | } | |
| 73 | + | ||
| 74 | + | // Deprecated: Use WorkflowState.Descriptor instead. | |
| 75 | + | func (WorkflowState) EnumDescriptor() ([]byte, []int) { | |
| 76 | + | return file_ermite_run_proto_rawDescGZIP(), []int{0} | |
| 77 | + | } | |
| 78 | + | ||
| 27 | 79 | // Run is one execution of one workflow file for one event, like a GitHub | |
| 28 | 80 | // workflow run. A re-run keeps the run and adds an attempt. | |
| 29 | 81 | type Run struct { | |
| @@ -2568,6 +2620,367 @@ func (*RemoveRunnerResponse) Descriptor() ([]byte, []int) { | |||
| 2568 | 2620 | return file_ermite_run_proto_rawDescGZIP(), []int{31} | |
| 2569 | 2621 | } | |
| 2570 | 2622 | ||
| 2623 | + | // Workflow is a workflow file of a repository and its state. | |
| 2624 | + | type Workflow struct { | |
| 2625 | + | state protoimpl.MessageState `protogen:"open.v1"` | |
| 2626 | + | // Path is the path of the file, always ".github/workflows/<file>". | |
| 2627 | + | Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` | |
| 2628 | + | // Name is the "name:" of the workflow at the tip of the default branch, the | |
| 2629 | + | // path when the file has none. Empty when the default branch has no such file | |
| 2630 | + | // or it cannot be read as a workflow. | |
| 2631 | + | Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` | |
| 2632 | + | // State is ENABLED or DISABLED. | |
| 2633 | + | State WorkflowState `protobuf:"varint,3,opt,name=state,proto3,enum=ermite.WorkflowState" json:"state,omitempty"` | |
| 2634 | + | unknownFields protoimpl.UnknownFields | |
| 2635 | + | sizeCache protoimpl.SizeCache | |
| 2636 | + | } | |
| 2637 | + | ||
| 2638 | + | func (x *Workflow) Reset() { | |
| 2639 | + | *x = Workflow{} | |
| 2640 | + | mi := &file_ermite_run_proto_msgTypes[32] | |
| 2641 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 2642 | + | ms.StoreMessageInfo(mi) | |
| 2643 | + | } | |
| 2644 | + | ||
| 2645 | + | func (x *Workflow) String() string { | |
| 2646 | + | return protoimpl.X.MessageStringOf(x) | |
| 2647 | + | } | |
| 2648 | + | ||
| 2649 | + | func (*Workflow) ProtoMessage() {} | |
| 2650 | + | ||
| 2651 | + | func (x *Workflow) ProtoReflect() protoreflect.Message { | |
| 2652 | + | mi := &file_ermite_run_proto_msgTypes[32] | |
| 2653 | + | if x != nil { | |
| 2654 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 2655 | + | if ms.LoadMessageInfo() == nil { | |
| 2656 | + | ms.StoreMessageInfo(mi) | |
| 2657 | + | } | |
| 2658 | + | return ms | |
| 2659 | + | } | |
| 2660 | + | return mi.MessageOf(x) | |
| 2661 | + | } | |
| 2662 | + | ||
| 2663 | + | // Deprecated: Use Workflow.ProtoReflect.Descriptor instead. | |
| 2664 | + | func (*Workflow) Descriptor() ([]byte, []int) { | |
| 2665 | + | return file_ermite_run_proto_rawDescGZIP(), []int{32} | |
| 2666 | + | } | |
| 2667 | + | ||
| 2668 | + | func (x *Workflow) GetPath() string { | |
| 2669 | + | if x != nil { | |
| 2670 | + | return x.Path | |
| 2671 | + | } | |
| 2672 | + | return "" | |
| 2673 | + | } | |
| 2674 | + | ||
| 2675 | + | func (x *Workflow) GetName() string { | |
| 2676 | + | if x != nil { | |
| 2677 | + | return x.Name | |
| 2678 | + | } | |
| 2679 | + | return "" | |
| 2680 | + | } | |
| 2681 | + | ||
| 2682 | + | func (x *Workflow) GetState() WorkflowState { | |
| 2683 | + | if x != nil { | |
| 2684 | + | return x.State | |
| 2685 | + | } | |
| 2686 | + | return WorkflowState_WORKFLOW_STATE_UNSPECIFIED | |
| 2687 | + | } | |
| 2688 | + | ||
| 2689 | + | // ListWorkflowsRequest names the repository. | |
| 2690 | + | type ListWorkflowsRequest struct { | |
| 2691 | + | state protoimpl.MessageState `protogen:"open.v1"` | |
| 2692 | + | // Repo is the repository name. | |
| 2693 | + | Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` | |
| 2694 | + | unknownFields protoimpl.UnknownFields | |
| 2695 | + | sizeCache protoimpl.SizeCache | |
| 2696 | + | } | |
| 2697 | + | ||
| 2698 | + | func (x *ListWorkflowsRequest) Reset() { | |
| 2699 | + | *x = ListWorkflowsRequest{} | |
| 2700 | + | mi := &file_ermite_run_proto_msgTypes[33] | |
| 2701 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 2702 | + | ms.StoreMessageInfo(mi) | |
| 2703 | + | } | |
| 2704 | + | ||
| 2705 | + | func (x *ListWorkflowsRequest) String() string { | |
| 2706 | + | return protoimpl.X.MessageStringOf(x) | |
| 2707 | + | } | |
| 2708 | + | ||
| 2709 | + | func (*ListWorkflowsRequest) ProtoMessage() {} | |
| 2710 | + | ||
| 2711 | + | func (x *ListWorkflowsRequest) ProtoReflect() protoreflect.Message { | |
| 2712 | + | mi := &file_ermite_run_proto_msgTypes[33] | |
| 2713 | + | if x != nil { | |
| 2714 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 2715 | + | if ms.LoadMessageInfo() == nil { | |
| 2716 | + | ms.StoreMessageInfo(mi) | |
| 2717 | + | } | |
| 2718 | + | return ms | |
| 2719 | + | } | |
| 2720 | + | return mi.MessageOf(x) | |
| 2721 | + | } | |
| 2722 | + | ||
| 2723 | + | // Deprecated: Use ListWorkflowsRequest.ProtoReflect.Descriptor instead. | |
| 2724 | + | func (*ListWorkflowsRequest) Descriptor() ([]byte, []int) { | |
| 2725 | + | return file_ermite_run_proto_rawDescGZIP(), []int{33} | |
| 2726 | + | } | |
| 2727 | + | ||
| 2728 | + | func (x *ListWorkflowsRequest) GetRepo() string { | |
| 2729 | + | if x != nil { | |
| 2730 | + | return x.Repo | |
| 2731 | + | } | |
| 2732 | + | return "" | |
| 2733 | + | } | |
| 2734 | + | ||
| 2735 | + | // ListWorkflowsResponse holds the workflows of a repository, ordered by path. | |
| 2736 | + | type ListWorkflowsResponse struct { | |
| 2737 | + | state protoimpl.MessageState `protogen:"open.v1"` | |
| 2738 | + | Workflows []*Workflow `protobuf:"bytes,1,rep,name=workflows,proto3" json:"workflows,omitempty"` | |
| 2739 | + | unknownFields protoimpl.UnknownFields | |
| 2740 | + | sizeCache protoimpl.SizeCache | |
| 2741 | + | } | |
| 2742 | + | ||
| 2743 | + | func (x *ListWorkflowsResponse) Reset() { | |
| 2744 | + | *x = ListWorkflowsResponse{} | |
| 2745 | + | mi := &file_ermite_run_proto_msgTypes[34] | |
| 2746 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 2747 | + | ms.StoreMessageInfo(mi) | |
| 2748 | + | } | |
| 2749 | + | ||
| 2750 | + | func (x *ListWorkflowsResponse) String() string { | |
| 2751 | + | return protoimpl.X.MessageStringOf(x) | |
| 2752 | + | } | |
| 2753 | + | ||
| 2754 | + | func (*ListWorkflowsResponse) ProtoMessage() {} | |
| 2755 | + | ||
| 2756 | + | func (x *ListWorkflowsResponse) ProtoReflect() protoreflect.Message { | |
| 2757 | + | mi := &file_ermite_run_proto_msgTypes[34] | |
| 2758 | + | if x != nil { | |
| 2759 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 2760 | + | if ms.LoadMessageInfo() == nil { | |
| 2761 | + | ms.StoreMessageInfo(mi) | |
| 2762 | + | } | |
| 2763 | + | return ms | |
| 2764 | + | } | |
| 2765 | + | return mi.MessageOf(x) | |
| 2766 | + | } | |
| 2767 | + | ||
| 2768 | + | // Deprecated: Use ListWorkflowsResponse.ProtoReflect.Descriptor instead. | |
| 2769 | + | func (*ListWorkflowsResponse) Descriptor() ([]byte, []int) { | |
| 2770 | + | return file_ermite_run_proto_rawDescGZIP(), []int{34} | |
| 2771 | + | } | |
| 2772 | + | ||
| 2773 | + | func (x *ListWorkflowsResponse) GetWorkflows() []*Workflow { | |
| 2774 | + | if x != nil { | |
| 2775 | + | return x.Workflows | |
| 2776 | + | } | |
| 2777 | + | return nil | |
| 2778 | + | } | |
| 2779 | + | ||
| 2780 | + | // DisableWorkflowRequest names the workflow to disable. | |
| 2781 | + | type DisableWorkflowRequest struct { | |
| 2782 | + | state protoimpl.MessageState `protogen:"open.v1"` | |
| 2783 | + | // Repo is the repository name. | |
| 2784 | + | Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` | |
| 2785 | + | // Workflow is the path of the file (".github/workflows/release.yml") or its | |
| 2786 | + | // file name ("release.yml"). The file does not have to exist. | |
| 2787 | + | Workflow string `protobuf:"bytes,2,opt,name=workflow,proto3" json:"workflow,omitempty"` | |
| 2788 | + | unknownFields protoimpl.UnknownFields | |
| 2789 | + | sizeCache protoimpl.SizeCache | |
| 2790 | + | } | |
| 2791 | + | ||
| 2792 | + | func (x *DisableWorkflowRequest) Reset() { | |
| 2793 | + | *x = DisableWorkflowRequest{} | |
| 2794 | + | mi := &file_ermite_run_proto_msgTypes[35] | |
| 2795 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 2796 | + | ms.StoreMessageInfo(mi) | |
| 2797 | + | } | |
| 2798 | + | ||
| 2799 | + | func (x *DisableWorkflowRequest) String() string { | |
| 2800 | + | return protoimpl.X.MessageStringOf(x) | |
| 2801 | + | } | |
| 2802 | + | ||
| 2803 | + | func (*DisableWorkflowRequest) ProtoMessage() {} | |
| 2804 | + | ||
| 2805 | + | func (x *DisableWorkflowRequest) ProtoReflect() protoreflect.Message { | |
| 2806 | + | mi := &file_ermite_run_proto_msgTypes[35] | |
| 2807 | + | if x != nil { | |
| 2808 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 2809 | + | if ms.LoadMessageInfo() == nil { | |
| 2810 | + | ms.StoreMessageInfo(mi) | |
| 2811 | + | } | |
| 2812 | + | return ms | |
| 2813 | + | } | |
| 2814 | + | return mi.MessageOf(x) | |
| 2815 | + | } | |
| 2816 | + | ||
| 2817 | + | // Deprecated: Use DisableWorkflowRequest.ProtoReflect.Descriptor instead. | |
| 2818 | + | func (*DisableWorkflowRequest) Descriptor() ([]byte, []int) { | |
| 2819 | + | return file_ermite_run_proto_rawDescGZIP(), []int{35} | |
| 2820 | + | } | |
| 2821 | + | ||
| 2822 | + | func (x *DisableWorkflowRequest) GetRepo() string { | |
| 2823 | + | if x != nil { | |
| 2824 | + | return x.Repo | |
| 2825 | + | } | |
| 2826 | + | return "" | |
| 2827 | + | } | |
| 2828 | + | ||
| 2829 | + | func (x *DisableWorkflowRequest) GetWorkflow() string { | |
| 2830 | + | if x != nil { | |
| 2831 | + | return x.Workflow | |
| 2832 | + | } | |
| 2833 | + | return "" | |
| 2834 | + | } | |
| 2835 | + | ||
| 2836 | + | // DisableWorkflowResponse holds the workflow after the change. | |
| 2837 | + | type DisableWorkflowResponse struct { | |
| 2838 | + | state protoimpl.MessageState `protogen:"open.v1"` | |
| 2839 | + | // Workflow has the normalized path and state DISABLED. | |
| 2840 | + | Workflow *Workflow `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` | |
| 2841 | + | unknownFields protoimpl.UnknownFields | |
| 2842 | + | sizeCache protoimpl.SizeCache | |
| 2843 | + | } | |
| 2844 | + | ||
| 2845 | + | func (x *DisableWorkflowResponse) Reset() { | |
| 2846 | + | *x = DisableWorkflowResponse{} | |
| 2847 | + | mi := &file_ermite_run_proto_msgTypes[36] | |
| 2848 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 2849 | + | ms.StoreMessageInfo(mi) | |
| 2850 | + | } | |
| 2851 | + | ||
| 2852 | + | func (x *DisableWorkflowResponse) String() string { | |
| 2853 | + | return protoimpl.X.MessageStringOf(x) | |
| 2854 | + | } | |
| 2855 | + | ||
| 2856 | + | func (*DisableWorkflowResponse) ProtoMessage() {} | |
| 2857 | + | ||
| 2858 | + | func (x *DisableWorkflowResponse) ProtoReflect() protoreflect.Message { | |
| 2859 | + | mi := &file_ermite_run_proto_msgTypes[36] | |
| 2860 | + | if x != nil { | |
| 2861 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 2862 | + | if ms.LoadMessageInfo() == nil { | |
| 2863 | + | ms.StoreMessageInfo(mi) | |
| 2864 | + | } | |
| 2865 | + | return ms | |
| 2866 | + | } | |
| 2867 | + | return mi.MessageOf(x) | |
| 2868 | + | } | |
| 2869 | + | ||
| 2870 | + | // Deprecated: Use DisableWorkflowResponse.ProtoReflect.Descriptor instead. | |
| 2871 | + | func (*DisableWorkflowResponse) Descriptor() ([]byte, []int) { | |
| 2872 | + | return file_ermite_run_proto_rawDescGZIP(), []int{36} | |
| 2873 | + | } | |
| 2874 | + | ||
| 2875 | + | func (x *DisableWorkflowResponse) GetWorkflow() *Workflow { | |
| 2876 | + | if x != nil { | |
| 2877 | + | return x.Workflow | |
| 2878 | + | } | |
| 2879 | + | return nil | |
| 2880 | + | } | |
| 2881 | + | ||
| 2882 | + | // EnableWorkflowRequest names the workflow to enable. | |
| 2883 | + | type EnableWorkflowRequest struct { | |
| 2884 | + | state protoimpl.MessageState `protogen:"open.v1"` | |
| 2885 | + | // Repo is the repository name. | |
| 2886 | + | Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` | |
| 2887 | + | // Workflow is the path of the file or its file name, as in | |
| 2888 | + | // DisableWorkflowRequest. | |
| 2889 | + | Workflow string `protobuf:"bytes,2,opt,name=workflow,proto3" json:"workflow,omitempty"` | |
| 2890 | + | unknownFields protoimpl.UnknownFields | |
| 2891 | + | sizeCache protoimpl.SizeCache | |
| 2892 | + | } | |
| 2893 | + | ||
| 2894 | + | func (x *EnableWorkflowRequest) Reset() { | |
| 2895 | + | *x = EnableWorkflowRequest{} | |
| 2896 | + | mi := &file_ermite_run_proto_msgTypes[37] | |
| 2897 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 2898 | + | ms.StoreMessageInfo(mi) | |
| 2899 | + | } | |
| 2900 | + | ||
| 2901 | + | func (x *EnableWorkflowRequest) String() string { | |
| 2902 | + | return protoimpl.X.MessageStringOf(x) | |
| 2903 | + | } | |
| 2904 | + | ||
| 2905 | + | func (*EnableWorkflowRequest) ProtoMessage() {} | |
| 2906 | + | ||
| 2907 | + | func (x *EnableWorkflowRequest) ProtoReflect() protoreflect.Message { | |
| 2908 | + | mi := &file_ermite_run_proto_msgTypes[37] | |
| 2909 | + | if x != nil { | |
| 2910 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 2911 | + | if ms.LoadMessageInfo() == nil { | |
| 2912 | + | ms.StoreMessageInfo(mi) | |
| 2913 | + | } | |
| 2914 | + | return ms | |
| 2915 | + | } | |
| 2916 | + | return mi.MessageOf(x) | |
| 2917 | + | } | |
| 2918 | + | ||
| 2919 | + | // Deprecated: Use EnableWorkflowRequest.ProtoReflect.Descriptor instead. | |
| 2920 | + | func (*EnableWorkflowRequest) Descriptor() ([]byte, []int) { | |
| 2921 | + | return file_ermite_run_proto_rawDescGZIP(), []int{37} | |
| 2922 | + | } | |
| 2923 | + | ||
| 2924 | + | func (x *EnableWorkflowRequest) GetRepo() string { | |
| 2925 | + | if x != nil { | |
| 2926 | + | return x.Repo | |
| 2927 | + | } | |
| 2928 | + | return "" | |
| 2929 | + | } | |
| 2930 | + | ||
| 2931 | + | func (x *EnableWorkflowRequest) GetWorkflow() string { | |
| 2932 | + | if x != nil { | |
| 2933 | + | return x.Workflow | |
| 2934 | + | } | |
| 2935 | + | return "" | |
| 2936 | + | } | |
| 2937 | + | ||
| 2938 | + | // EnableWorkflowResponse holds the workflow after the change. | |
| 2939 | + | type EnableWorkflowResponse struct { | |
| 2940 | + | state protoimpl.MessageState `protogen:"open.v1"` | |
| 2941 | + | // Workflow has the normalized path and state ENABLED. | |
| 2942 | + | Workflow *Workflow `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` | |
| 2943 | + | unknownFields protoimpl.UnknownFields | |
| 2944 | + | sizeCache protoimpl.SizeCache | |
| 2945 | + | } | |
| 2946 | + | ||
| 2947 | + | func (x *EnableWorkflowResponse) Reset() { | |
| 2948 | + | *x = EnableWorkflowResponse{} | |
| 2949 | + | mi := &file_ermite_run_proto_msgTypes[38] | |
| 2950 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 2951 | + | ms.StoreMessageInfo(mi) | |
| 2952 | + | } | |
| 2953 | + | ||
| 2954 | + | func (x *EnableWorkflowResponse) String() string { | |
| 2955 | + | return protoimpl.X.MessageStringOf(x) | |
| 2956 | + | } | |
| 2957 | + | ||
| 2958 | + | func (*EnableWorkflowResponse) ProtoMessage() {} | |
| 2959 | + | ||
| 2960 | + | func (x *EnableWorkflowResponse) ProtoReflect() protoreflect.Message { | |
| 2961 | + | mi := &file_ermite_run_proto_msgTypes[38] | |
| 2962 | + | if x != nil { | |
| 2963 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
| 2964 | + | if ms.LoadMessageInfo() == nil { | |
| 2965 | + | ms.StoreMessageInfo(mi) | |
| 2966 | + | } | |
| 2967 | + | return ms | |
| 2968 | + | } | |
| 2969 | + | return mi.MessageOf(x) | |
| 2970 | + | } | |
| 2971 | + | ||
| 2972 | + | // Deprecated: Use EnableWorkflowResponse.ProtoReflect.Descriptor instead. | |
| 2973 | + | func (*EnableWorkflowResponse) Descriptor() ([]byte, []int) { | |
| 2974 | + | return file_ermite_run_proto_rawDescGZIP(), []int{38} | |
| 2975 | + | } | |
| 2976 | + | ||
| 2977 | + | func (x *EnableWorkflowResponse) GetWorkflow() *Workflow { | |
| 2978 | + | if x != nil { | |
| 2979 | + | return x.Workflow | |
| 2980 | + | } | |
| 2981 | + | return nil | |
| 2982 | + | } | |
| 2983 | + | ||
| 2571 | 2984 | var File_ermite_run_proto protoreflect.FileDescriptor | |
| 2572 | 2985 | ||
| 2573 | 2986 | const file_ermite_run_proto_rawDesc = "" + | |
| @@ -2770,7 +3183,29 @@ const file_ermite_run_proto_rawDesc = "" + | |||
| 2770 | 3183 | "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"2\n" + | |
| 2771 | 3184 | "\x13RemoveRunnerRequest\x12\x1b\n" + | |
| 2772 | 3185 | "\trunner_id\x18\x01 \x01(\tR\brunnerId\"\x16\n" + | |
| 2773 | - | "\x14RemoveRunnerResponse2\xdc\x06\n" + | |
| 3186 | + | "\x14RemoveRunnerResponse\"_\n" + | |
| 3187 | + | "\bWorkflow\x12\x12\n" + | |
| 3188 | + | "\x04path\x18\x01 \x01(\tR\x04path\x12\x12\n" + | |
| 3189 | + | "\x04name\x18\x02 \x01(\tR\x04name\x12+\n" + | |
| 3190 | + | "\x05state\x18\x03 \x01(\x0e2\x15.ermite.WorkflowStateR\x05state\"*\n" + | |
| 3191 | + | "\x14ListWorkflowsRequest\x12\x12\n" + | |
| 3192 | + | "\x04repo\x18\x01 \x01(\tR\x04repo\"G\n" + | |
| 3193 | + | "\x15ListWorkflowsResponse\x12.\n" + | |
| 3194 | + | "\tworkflows\x18\x01 \x03(\v2\x10.ermite.WorkflowR\tworkflows\"H\n" + | |
| 3195 | + | "\x16DisableWorkflowRequest\x12\x12\n" + | |
| 3196 | + | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x1a\n" + | |
| 3197 | + | "\bworkflow\x18\x02 \x01(\tR\bworkflow\"G\n" + | |
| 3198 | + | "\x17DisableWorkflowResponse\x12,\n" + | |
| 3199 | + | "\bworkflow\x18\x01 \x01(\v2\x10.ermite.WorkflowR\bworkflow\"G\n" + | |
| 3200 | + | "\x15EnableWorkflowRequest\x12\x12\n" + | |
| 3201 | + | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x1a\n" + | |
| 3202 | + | "\bworkflow\x18\x02 \x01(\tR\bworkflow\"F\n" + | |
| 3203 | + | "\x16EnableWorkflowResponse\x12,\n" + | |
| 3204 | + | "\bworkflow\x18\x01 \x01(\v2\x10.ermite.WorkflowR\bworkflow*h\n" + | |
| 3205 | + | "\rWorkflowState\x12\x1e\n" + | |
| 3206 | + | "\x1aWORKFLOW_STATE_UNSPECIFIED\x10\x00\x12\x1a\n" + | |
| 3207 | + | "\x16WORKFLOW_STATE_ENABLED\x10\x01\x12\x1b\n" + | |
| 3208 | + | "\x17WORKFLOW_STATE_DISABLED\x10\x022\xcf\b\n" + | |
| 2774 | 3209 | "\n" + | |
| 2775 | 3210 | "RunService\x12=\n" + | |
| 2776 | 3211 | "\bListRuns\x12\x17.ermite.ListRunsRequest\x1a\x18.ermite.ListRunsResponse\x127\n" + | |
| @@ -2781,7 +3216,10 @@ const file_ermite_run_proto_rawDesc = "" + | |||
| 2781 | 3216 | "\tGetJobLog\x12\x18.ermite.GetJobLogRequest\x1a\x19.ermite.GetJobLogResponse0\x01\x12@\n" + | |
| 2782 | 3217 | "\tCancelRun\x12\x18.ermite.CancelRunRequest\x1a\x19.ermite.CancelRunResponse\x12=\n" + | |
| 2783 | 3218 | "\bRerunRun\x12\x17.ermite.RerunRunRequest\x1a\x18.ermite.RerunRunResponse\x12U\n" + | |
| 2784 | - | "\x10DispatchWorkflow\x12\x1f.ermite.DispatchWorkflowRequest\x1a .ermite.DispatchWorkflowResponse\x12C\n" + | |
| 3219 | + | "\x10DispatchWorkflow\x12\x1f.ermite.DispatchWorkflowRequest\x1a .ermite.DispatchWorkflowResponse\x12L\n" + | |
| 3220 | + | "\rListWorkflows\x12\x1c.ermite.ListWorkflowsRequest\x1a\x1d.ermite.ListWorkflowsResponse\x12R\n" + | |
| 3221 | + | "\x0fDisableWorkflow\x12\x1e.ermite.DisableWorkflowRequest\x1a\x1f.ermite.DisableWorkflowResponse\x12O\n" + | |
| 3222 | + | "\x0eEnableWorkflow\x12\x1d.ermite.EnableWorkflowRequest\x1a\x1e.ermite.EnableWorkflowResponse\x12C\n" + | |
| 2785 | 3223 | "\n" + | |
| 2786 | 3224 | "ListChecks\x12\x19.ermite.ListChecksRequest\x1a\x1a.ermite.ListChecksResponse\x12F\n" + | |
| 2787 | 3225 | "\vListRunners\x12\x1a.ermite.ListRunnersRequest\x1a\x1b.ermite.ListRunnersResponse\x12I\n" + | |
| @@ -2801,118 +3239,137 @@ func file_ermite_run_proto_rawDescGZIP() []byte { | |||
| 2801 | 3239 | return file_ermite_run_proto_rawDescData | |
| 2802 | 3240 | } | |
| 2803 | 3241 | ||
| 2804 | - | var file_ermite_run_proto_msgTypes = make([]protoimpl.MessageInfo, 33) | |
| 3242 | + | var file_ermite_run_proto_enumTypes = make([]protoimpl.EnumInfo, 1) | |
| 3243 | + | var file_ermite_run_proto_msgTypes = make([]protoimpl.MessageInfo, 40) | |
| 2805 | 3244 | var file_ermite_run_proto_goTypes = []any{ | |
| 2806 | - | (*Run)(nil), // 0: ermite.Run | |
| 2807 | - | (*RunJob)(nil), // 1: ermite.RunJob | |
| 2808 | - | (*Step)(nil), // 2: ermite.Step | |
| 2809 | - | (*Check)(nil), // 3: ermite.Check | |
| 2810 | - | (*Runner)(nil), // 4: ermite.Runner | |
| 2811 | - | (*ListRunsRequest)(nil), // 5: ermite.ListRunsRequest | |
| 2812 | - | (*ListRunsResponse)(nil), // 6: ermite.ListRunsResponse | |
| 2813 | - | (*GetRunRequest)(nil), // 7: ermite.GetRunRequest | |
| 2814 | - | (*GetRunResponse)(nil), // 8: ermite.GetRunResponse | |
| 2815 | - | (*GetJobRequest)(nil), // 9: ermite.GetJobRequest | |
| 2816 | - | (*GetJobResponse)(nil), // 10: ermite.GetJobResponse | |
| 2817 | - | (*ListAnnotationsRequest)(nil), // 11: ermite.ListAnnotationsRequest | |
| 2818 | - | (*ListAnnotationsResponse)(nil), // 12: ermite.ListAnnotationsResponse | |
| 2819 | - | (*JobAnnotation)(nil), // 13: ermite.JobAnnotation | |
| 2820 | - | (*GetStepSummariesRequest)(nil), // 14: ermite.GetStepSummariesRequest | |
| 2821 | - | (*GetStepSummariesResponse)(nil), // 15: ermite.GetStepSummariesResponse | |
| 2822 | - | (*StepSummary)(nil), // 16: ermite.StepSummary | |
| 2823 | - | (*GetJobLogRequest)(nil), // 17: ermite.GetJobLogRequest | |
| 2824 | - | (*GetJobLogResponse)(nil), // 18: ermite.GetJobLogResponse | |
| 2825 | - | (*JobLogLine)(nil), // 19: ermite.JobLogLine | |
| 2826 | - | (*CancelRunRequest)(nil), // 20: ermite.CancelRunRequest | |
| 2827 | - | (*CancelRunResponse)(nil), // 21: ermite.CancelRunResponse | |
| 2828 | - | (*RerunRunRequest)(nil), // 22: ermite.RerunRunRequest | |
| 2829 | - | (*RerunRunResponse)(nil), // 23: ermite.RerunRunResponse | |
| 2830 | - | (*DispatchWorkflowRequest)(nil), // 24: ermite.DispatchWorkflowRequest | |
| 2831 | - | (*DispatchWorkflowResponse)(nil), // 25: ermite.DispatchWorkflowResponse | |
| 2832 | - | (*ListChecksRequest)(nil), // 26: ermite.ListChecksRequest | |
| 2833 | - | (*ListChecksResponse)(nil), // 27: ermite.ListChecksResponse | |
| 2834 | - | (*ListRunnersRequest)(nil), // 28: ermite.ListRunnersRequest | |
| 2835 | - | (*ListRunnersResponse)(nil), // 29: ermite.ListRunnersResponse | |
| 2836 | - | (*RemoveRunnerRequest)(nil), // 30: ermite.RemoveRunnerRequest | |
| 2837 | - | (*RemoveRunnerResponse)(nil), // 31: ermite.RemoveRunnerResponse | |
| 2838 | - | nil, // 32: ermite.DispatchWorkflowRequest.InputsEntry | |
| 2839 | - | (CiStatus)(0), // 33: ermite.CiStatus | |
| 2840 | - | (CiConclusion)(0), // 34: ermite.CiConclusion | |
| 2841 | - | (*timestamppb.Timestamp)(nil), // 35: google.protobuf.Timestamp | |
| 2842 | - | (RunnerIsolation)(0), // 36: ermite.RunnerIsolation | |
| 2843 | - | (StepState)(0), // 37: ermite.StepState | |
| 2844 | - | (*Annotation)(nil), // 38: ermite.Annotation | |
| 3245 | + | (WorkflowState)(0), // 0: ermite.WorkflowState | |
| 3246 | + | (*Run)(nil), // 1: ermite.Run | |
| 3247 | + | (*RunJob)(nil), // 2: ermite.RunJob | |
| 3248 | + | (*Step)(nil), // 3: ermite.Step | |
| 3249 | + | (*Check)(nil), // 4: ermite.Check | |
| 3250 | + | (*Runner)(nil), // 5: ermite.Runner | |
| 3251 | + | (*ListRunsRequest)(nil), // 6: ermite.ListRunsRequest | |
| 3252 | + | (*ListRunsResponse)(nil), // 7: ermite.ListRunsResponse | |
| 3253 | + | (*GetRunRequest)(nil), // 8: ermite.GetRunRequest | |
| 3254 | + | (*GetRunResponse)(nil), // 9: ermite.GetRunResponse | |
| 3255 | + | (*GetJobRequest)(nil), // 10: ermite.GetJobRequest | |
| 3256 | + | (*GetJobResponse)(nil), // 11: ermite.GetJobResponse | |
| 3257 | + | (*ListAnnotationsRequest)(nil), // 12: ermite.ListAnnotationsRequest | |
| 3258 | + | (*ListAnnotationsResponse)(nil), // 13: ermite.ListAnnotationsResponse | |
| 3259 | + | (*JobAnnotation)(nil), // 14: ermite.JobAnnotation | |
| 3260 | + | (*GetStepSummariesRequest)(nil), // 15: ermite.GetStepSummariesRequest | |
| 3261 | + | (*GetStepSummariesResponse)(nil), // 16: ermite.GetStepSummariesResponse | |
| 3262 | + | (*StepSummary)(nil), // 17: ermite.StepSummary | |
| 3263 | + | (*GetJobLogRequest)(nil), // 18: ermite.GetJobLogRequest | |
| 3264 | + | (*GetJobLogResponse)(nil), // 19: ermite.GetJobLogResponse | |
| 3265 | + | (*JobLogLine)(nil), // 20: ermite.JobLogLine | |
| 3266 | + | (*CancelRunRequest)(nil), // 21: ermite.CancelRunRequest | |
| 3267 | + | (*CancelRunResponse)(nil), // 22: ermite.CancelRunResponse | |
| 3268 | + | (*RerunRunRequest)(nil), // 23: ermite.RerunRunRequest | |
| 3269 | + | (*RerunRunResponse)(nil), // 24: ermite.RerunRunResponse | |
| 3270 | + | (*DispatchWorkflowRequest)(nil), // 25: ermite.DispatchWorkflowRequest | |
| 3271 | + | (*DispatchWorkflowResponse)(nil), // 26: ermite.DispatchWorkflowResponse | |
| 3272 | + | (*ListChecksRequest)(nil), // 27: ermite.ListChecksRequest | |
| 3273 | + | (*ListChecksResponse)(nil), // 28: ermite.ListChecksResponse | |
| 3274 | + | (*ListRunnersRequest)(nil), // 29: ermite.ListRunnersRequest | |
| 3275 | + | (*ListRunnersResponse)(nil), // 30: ermite.ListRunnersResponse | |
| 3276 | + | (*RemoveRunnerRequest)(nil), // 31: ermite.RemoveRunnerRequest | |
| 3277 | + | (*RemoveRunnerResponse)(nil), // 32: ermite.RemoveRunnerResponse | |
| 3278 | + | (*Workflow)(nil), // 33: ermite.Workflow | |
| 3279 | + | (*ListWorkflowsRequest)(nil), // 34: ermite.ListWorkflowsRequest | |
| 3280 | + | (*ListWorkflowsResponse)(nil), // 35: ermite.ListWorkflowsResponse | |
| 3281 | + | (*DisableWorkflowRequest)(nil), // 36: ermite.DisableWorkflowRequest | |
| 3282 | + | (*DisableWorkflowResponse)(nil), // 37: ermite.DisableWorkflowResponse | |
| 3283 | + | (*EnableWorkflowRequest)(nil), // 38: ermite.EnableWorkflowRequest | |
| 3284 | + | (*EnableWorkflowResponse)(nil), // 39: ermite.EnableWorkflowResponse | |
| 3285 | + | nil, // 40: ermite.DispatchWorkflowRequest.InputsEntry | |
| 3286 | + | (CiStatus)(0), // 41: ermite.CiStatus | |
| 3287 | + | (CiConclusion)(0), // 42: ermite.CiConclusion | |
| 3288 | + | (*timestamppb.Timestamp)(nil), // 43: google.protobuf.Timestamp | |
| 3289 | + | (RunnerIsolation)(0), // 44: ermite.RunnerIsolation | |
| 3290 | + | (StepState)(0), // 45: ermite.StepState | |
| 3291 | + | (*Annotation)(nil), // 46: ermite.Annotation | |
| 2845 | 3292 | } | |
| 2846 | 3293 | var file_ermite_run_proto_depIdxs = []int32{ | |
| 2847 | - | 33, // 0: ermite.Run.status:type_name -> ermite.CiStatus | |
| 2848 | - | 34, // 1: ermite.Run.conclusion:type_name -> ermite.CiConclusion | |
| 2849 | - | 35, // 2: ermite.Run.created_at:type_name -> google.protobuf.Timestamp | |
| 2850 | - | 35, // 3: ermite.Run.started_at:type_name -> google.protobuf.Timestamp | |
| 2851 | - | 35, // 4: ermite.Run.completed_at:type_name -> google.protobuf.Timestamp | |
| 2852 | - | 33, // 5: ermite.RunJob.status:type_name -> ermite.CiStatus | |
| 2853 | - | 34, // 6: ermite.RunJob.conclusion:type_name -> ermite.CiConclusion | |
| 2854 | - | 36, // 7: ermite.RunJob.isolation:type_name -> ermite.RunnerIsolation | |
| 2855 | - | 2, // 8: ermite.RunJob.steps:type_name -> ermite.Step | |
| 2856 | - | 35, // 9: ermite.RunJob.created_at:type_name -> google.protobuf.Timestamp | |
| 2857 | - | 35, // 10: ermite.RunJob.started_at:type_name -> google.protobuf.Timestamp | |
| 2858 | - | 35, // 11: ermite.RunJob.completed_at:type_name -> google.protobuf.Timestamp | |
| 2859 | - | 37, // 12: ermite.Step.state:type_name -> ermite.StepState | |
| 2860 | - | 34, // 13: ermite.Step.conclusion:type_name -> ermite.CiConclusion | |
| 2861 | - | 35, // 14: ermite.Step.started_at:type_name -> google.protobuf.Timestamp | |
| 2862 | - | 35, // 15: ermite.Step.completed_at:type_name -> google.protobuf.Timestamp | |
| 2863 | - | 34, // 16: ermite.Step.outcome:type_name -> ermite.CiConclusion | |
| 2864 | - | 33, // 17: ermite.Check.status:type_name -> ermite.CiStatus | |
| 2865 | - | 34, // 18: ermite.Check.conclusion:type_name -> ermite.CiConclusion | |
| 2866 | - | 35, // 19: ermite.Check.started_at:type_name -> google.protobuf.Timestamp | |
| 2867 | - | 35, // 20: ermite.Check.completed_at:type_name -> google.protobuf.Timestamp | |
| 2868 | - | 36, // 21: ermite.Runner.isolation:type_name -> ermite.RunnerIsolation | |
| 2869 | - | 35, // 22: ermite.Runner.registered_at:type_name -> google.protobuf.Timestamp | |
| 2870 | - | 35, // 23: ermite.Runner.last_seen:type_name -> google.protobuf.Timestamp | |
| 2871 | - | 33, // 24: ermite.ListRunsRequest.status:type_name -> ermite.CiStatus | |
| 2872 | - | 0, // 25: ermite.ListRunsResponse.runs:type_name -> ermite.Run | |
| 2873 | - | 0, // 26: ermite.GetRunResponse.run:type_name -> ermite.Run | |
| 2874 | - | 1, // 27: ermite.GetRunResponse.jobs:type_name -> ermite.RunJob | |
| 2875 | - | 1, // 28: ermite.GetJobResponse.job:type_name -> ermite.RunJob | |
| 2876 | - | 13, // 29: ermite.ListAnnotationsResponse.annotations:type_name -> ermite.JobAnnotation | |
| 2877 | - | 38, // 30: ermite.JobAnnotation.annotation:type_name -> ermite.Annotation | |
| 2878 | - | 16, // 31: ermite.GetStepSummariesResponse.summaries:type_name -> ermite.StepSummary | |
| 2879 | - | 19, // 32: ermite.GetJobLogResponse.lines:type_name -> ermite.JobLogLine | |
| 2880 | - | 35, // 33: ermite.JobLogLine.time:type_name -> google.protobuf.Timestamp | |
| 2881 | - | 0, // 34: ermite.CancelRunResponse.run:type_name -> ermite.Run | |
| 2882 | - | 0, // 35: ermite.RerunRunResponse.run:type_name -> ermite.Run | |
| 2883 | - | 32, // 36: ermite.DispatchWorkflowRequest.inputs:type_name -> ermite.DispatchWorkflowRequest.InputsEntry | |
| 2884 | - | 0, // 37: ermite.DispatchWorkflowResponse.run:type_name -> ermite.Run | |
| 2885 | - | 3, // 38: ermite.ListChecksResponse.checks:type_name -> ermite.Check | |
| 2886 | - | 4, // 39: ermite.ListRunnersResponse.runners:type_name -> ermite.Runner | |
| 2887 | - | 5, // 40: ermite.RunService.ListRuns:input_type -> ermite.ListRunsRequest | |
| 2888 | - | 7, // 41: ermite.RunService.GetRun:input_type -> ermite.GetRunRequest | |
| 2889 | - | 9, // 42: ermite.RunService.GetJob:input_type -> ermite.GetJobRequest | |
| 2890 | - | 11, // 43: ermite.RunService.ListAnnotations:input_type -> ermite.ListAnnotationsRequest | |
| 2891 | - | 14, // 44: ermite.RunService.GetStepSummaries:input_type -> ermite.GetStepSummariesRequest | |
| 2892 | - | 17, // 45: ermite.RunService.GetJobLog:input_type -> ermite.GetJobLogRequest | |
| 2893 | - | 20, // 46: ermite.RunService.CancelRun:input_type -> ermite.CancelRunRequest | |
| 2894 | - | 22, // 47: ermite.RunService.RerunRun:input_type -> ermite.RerunRunRequest | |
| 2895 | - | 24, // 48: ermite.RunService.DispatchWorkflow:input_type -> ermite.DispatchWorkflowRequest | |
| 2896 | - | 26, // 49: ermite.RunService.ListChecks:input_type -> ermite.ListChecksRequest | |
| 2897 | - | 28, // 50: ermite.RunService.ListRunners:input_type -> ermite.ListRunnersRequest | |
| 2898 | - | 30, // 51: ermite.RunService.RemoveRunner:input_type -> ermite.RemoveRunnerRequest | |
| 2899 | - | 6, // 52: ermite.RunService.ListRuns:output_type -> ermite.ListRunsResponse | |
| 2900 | - | 8, // 53: ermite.RunService.GetRun:output_type -> ermite.GetRunResponse | |
| 2901 | - | 10, // 54: ermite.RunService.GetJob:output_type -> ermite.GetJobResponse | |
| 2902 | - | 12, // 55: ermite.RunService.ListAnnotations:output_type -> ermite.ListAnnotationsResponse | |
| 2903 | - | 15, // 56: ermite.RunService.GetStepSummaries:output_type -> ermite.GetStepSummariesResponse | |
| 2904 | - | 18, // 57: ermite.RunService.GetJobLog:output_type -> ermite.GetJobLogResponse | |
| 2905 | - | 21, // 58: ermite.RunService.CancelRun:output_type -> ermite.CancelRunResponse | |
| 2906 | - | 23, // 59: ermite.RunService.RerunRun:output_type -> ermite.RerunRunResponse | |
| 2907 | - | 25, // 60: ermite.RunService.DispatchWorkflow:output_type -> ermite.DispatchWorkflowResponse | |
| 2908 | - | 27, // 61: ermite.RunService.ListChecks:output_type -> ermite.ListChecksResponse | |
| 2909 | - | 29, // 62: ermite.RunService.ListRunners:output_type -> ermite.ListRunnersResponse | |
| 2910 | - | 31, // 63: ermite.RunService.RemoveRunner:output_type -> ermite.RemoveRunnerResponse | |
| 2911 | - | 52, // [52:64] is the sub-list for method output_type | |
| 2912 | - | 40, // [40:52] is the sub-list for method input_type | |
| 2913 | - | 40, // [40:40] is the sub-list for extension type_name | |
| 2914 | - | 40, // [40:40] is the sub-list for extension extendee | |
| 2915 | - | 0, // [0:40] is the sub-list for field type_name | |
| 3294 | + | 41, // 0: ermite.Run.status:type_name -> ermite.CiStatus | |
| 3295 | + | 42, // 1: ermite.Run.conclusion:type_name -> ermite.CiConclusion | |
| 3296 | + | 43, // 2: ermite.Run.created_at:type_name -> google.protobuf.Timestamp | |
| 3297 | + | 43, // 3: ermite.Run.started_at:type_name -> google.protobuf.Timestamp | |
| 3298 | + | 43, // 4: ermite.Run.completed_at:type_name -> google.protobuf.Timestamp | |
| 3299 | + | 41, // 5: ermite.RunJob.status:type_name -> ermite.CiStatus | |
| 3300 | + | 42, // 6: ermite.RunJob.conclusion:type_name -> ermite.CiConclusion | |
| 3301 | + | 44, // 7: ermite.RunJob.isolation:type_name -> ermite.RunnerIsolation | |
| 3302 | + | 3, // 8: ermite.RunJob.steps:type_name -> ermite.Step | |
| 3303 | + | 43, // 9: ermite.RunJob.created_at:type_name -> google.protobuf.Timestamp | |
| 3304 | + | 43, // 10: ermite.RunJob.started_at:type_name -> google.protobuf.Timestamp | |
| 3305 | + | 43, // 11: ermite.RunJob.completed_at:type_name -> google.protobuf.Timestamp | |
| 3306 | + | 45, // 12: ermite.Step.state:type_name -> ermite.StepState | |
| 3307 | + | 42, // 13: ermite.Step.conclusion:type_name -> ermite.CiConclusion | |
| 3308 | + | 43, // 14: ermite.Step.started_at:type_name -> google.protobuf.Timestamp | |
| 3309 | + | 43, // 15: ermite.Step.completed_at:type_name -> google.protobuf.Timestamp | |
| 3310 | + | 42, // 16: ermite.Step.outcome:type_name -> ermite.CiConclusion | |
| 3311 | + | 41, // 17: ermite.Check.status:type_name -> ermite.CiStatus | |
| 3312 | + | 42, // 18: ermite.Check.conclusion:type_name -> ermite.CiConclusion | |
| 3313 | + | 43, // 19: ermite.Check.started_at:type_name -> google.protobuf.Timestamp | |
| 3314 | + | 43, // 20: ermite.Check.completed_at:type_name -> google.protobuf.Timestamp | |
| 3315 | + | 44, // 21: ermite.Runner.isolation:type_name -> ermite.RunnerIsolation | |
| 3316 | + | 43, // 22: ermite.Runner.registered_at:type_name -> google.protobuf.Timestamp | |
| 3317 | + | 43, // 23: ermite.Runner.last_seen:type_name -> google.protobuf.Timestamp | |
| 3318 | + | 41, // 24: ermite.ListRunsRequest.status:type_name -> ermite.CiStatus | |
| 3319 | + | 1, // 25: ermite.ListRunsResponse.runs:type_name -> ermite.Run | |
| 3320 | + | 1, // 26: ermite.GetRunResponse.run:type_name -> ermite.Run | |
| 3321 | + | 2, // 27: ermite.GetRunResponse.jobs:type_name -> ermite.RunJob | |
| 3322 | + | 2, // 28: ermite.GetJobResponse.job:type_name -> ermite.RunJob | |
| 3323 | + | 14, // 29: ermite.ListAnnotationsResponse.annotations:type_name -> ermite.JobAnnotation | |
| 3324 | + | 46, // 30: ermite.JobAnnotation.annotation:type_name -> ermite.Annotation | |
| 3325 | + | 17, // 31: ermite.GetStepSummariesResponse.summaries:type_name -> ermite.StepSummary | |
| 3326 | + | 20, // 32: ermite.GetJobLogResponse.lines:type_name -> ermite.JobLogLine | |
| 3327 | + | 43, // 33: ermite.JobLogLine.time:type_name -> google.protobuf.Timestamp | |
| 3328 | + | 1, // 34: ermite.CancelRunResponse.run:type_name -> ermite.Run | |
| 3329 | + | 1, // 35: ermite.RerunRunResponse.run:type_name -> ermite.Run | |
| 3330 | + | 40, // 36: ermite.DispatchWorkflowRequest.inputs:type_name -> ermite.DispatchWorkflowRequest.InputsEntry | |
| 3331 | + | 1, // 37: ermite.DispatchWorkflowResponse.run:type_name -> ermite.Run | |
| 3332 | + | 4, // 38: ermite.ListChecksResponse.checks:type_name -> ermite.Check | |
| 3333 | + | 5, // 39: ermite.ListRunnersResponse.runners:type_name -> ermite.Runner | |
| 3334 | + | 0, // 40: ermite.Workflow.state:type_name -> ermite.WorkflowState | |
| 3335 | + | 33, // 41: ermite.ListWorkflowsResponse.workflows:type_name -> ermite.Workflow | |
| 3336 | + | 33, // 42: ermite.DisableWorkflowResponse.workflow:type_name -> ermite.Workflow | |
| 3337 | + | 33, // 43: ermite.EnableWorkflowResponse.workflow:type_name -> ermite.Workflow | |
| 3338 | + | 6, // 44: ermite.RunService.ListRuns:input_type -> ermite.ListRunsRequest | |
| 3339 | + | 8, // 45: ermite.RunService.GetRun:input_type -> ermite.GetRunRequest | |
| 3340 | + | 10, // 46: ermite.RunService.GetJob:input_type -> ermite.GetJobRequest | |
| 3341 | + | 12, // 47: ermite.RunService.ListAnnotations:input_type -> ermite.ListAnnotationsRequest | |
| 3342 | + | 15, // 48: ermite.RunService.GetStepSummaries:input_type -> ermite.GetStepSummariesRequest | |
| 3343 | + | 18, // 49: ermite.RunService.GetJobLog:input_type -> ermite.GetJobLogRequest | |
| 3344 | + | 21, // 50: ermite.RunService.CancelRun:input_type -> ermite.CancelRunRequest | |
| 3345 | + | 23, // 51: ermite.RunService.RerunRun:input_type -> ermite.RerunRunRequest | |
| 3346 | + | 25, // 52: ermite.RunService.DispatchWorkflow:input_type -> ermite.DispatchWorkflowRequest | |
| 3347 | + | 34, // 53: ermite.RunService.ListWorkflows:input_type -> ermite.ListWorkflowsRequest | |
| 3348 | + | 36, // 54: ermite.RunService.DisableWorkflow:input_type -> ermite.DisableWorkflowRequest | |
| 3349 | + | 38, // 55: ermite.RunService.EnableWorkflow:input_type -> ermite.EnableWorkflowRequest | |
| 3350 | + | 27, // 56: ermite.RunService.ListChecks:input_type -> ermite.ListChecksRequest | |
| 3351 | + | 29, // 57: ermite.RunService.ListRunners:input_type -> ermite.ListRunnersRequest | |
| 3352 | + | 31, // 58: ermite.RunService.RemoveRunner:input_type -> ermite.RemoveRunnerRequest | |
| 3353 | + | 7, // 59: ermite.RunService.ListRuns:output_type -> ermite.ListRunsResponse | |
| 3354 | + | 9, // 60: ermite.RunService.GetRun:output_type -> ermite.GetRunResponse | |
| 3355 | + | 11, // 61: ermite.RunService.GetJob:output_type -> ermite.GetJobResponse | |
| 3356 | + | 13, // 62: ermite.RunService.ListAnnotations:output_type -> ermite.ListAnnotationsResponse | |
| 3357 | + | 16, // 63: ermite.RunService.GetStepSummaries:output_type -> ermite.GetStepSummariesResponse | |
| 3358 | + | 19, // 64: ermite.RunService.GetJobLog:output_type -> ermite.GetJobLogResponse | |
| 3359 | + | 22, // 65: ermite.RunService.CancelRun:output_type -> ermite.CancelRunResponse | |
| 3360 | + | 24, // 66: ermite.RunService.RerunRun:output_type -> ermite.RerunRunResponse | |
| 3361 | + | 26, // 67: ermite.RunService.DispatchWorkflow:output_type -> ermite.DispatchWorkflowResponse | |
| 3362 | + | 35, // 68: ermite.RunService.ListWorkflows:output_type -> ermite.ListWorkflowsResponse | |
| 3363 | + | 37, // 69: ermite.RunService.DisableWorkflow:output_type -> ermite.DisableWorkflowResponse | |
| 3364 | + | 39, // 70: ermite.RunService.EnableWorkflow:output_type -> ermite.EnableWorkflowResponse | |
| 3365 | + | 28, // 71: ermite.RunService.ListChecks:output_type -> ermite.ListChecksResponse | |
| 3366 | + | 30, // 72: ermite.RunService.ListRunners:output_type -> ermite.ListRunnersResponse | |
| 3367 | + | 32, // 73: ermite.RunService.RemoveRunner:output_type -> ermite.RemoveRunnerResponse | |
| 3368 | + | 59, // [59:74] is the sub-list for method output_type | |
| 3369 | + | 44, // [44:59] is the sub-list for method input_type | |
| 3370 | + | 44, // [44:44] is the sub-list for extension type_name | |
| 3371 | + | 44, // [44:44] is the sub-list for extension extendee | |
| 3372 | + | 0, // [0:44] is the sub-list for field type_name | |
| 2916 | 3373 | } | |
| 2917 | 3374 | ||
| 2918 | 3375 | func init() { file_ermite_run_proto_init() } | |
| @@ -2926,13 +3383,14 @@ func file_ermite_run_proto_init() { | |||
| 2926 | 3383 | File: protoimpl.DescBuilder{ | |
| 2927 | 3384 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | |
| 2928 | 3385 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_run_proto_rawDesc), len(file_ermite_run_proto_rawDesc)), | |
| 2929 | - | NumEnums: 0, | |
| 2930 | - | NumMessages: 33, | |
| 3386 | + | NumEnums: 1, | |
| 3387 | + | NumMessages: 40, | |
| 2931 | 3388 | NumExtensions: 0, | |
| 2932 | 3389 | NumServices: 1, | |
| 2933 | 3390 | }, | |
| 2934 | 3391 | GoTypes: file_ermite_run_proto_goTypes, | |
| 2935 | 3392 | DependencyIndexes: file_ermite_run_proto_depIdxs, | |
| 3393 | + | EnumInfos: file_ermite_run_proto_enumTypes, | |
| 2936 | 3394 | MessageInfos: file_ermite_run_proto_msgTypes, | |
| 2937 | 3395 | }.Build() | |
| 2938 | 3396 | File_ermite_run_proto = out.File | |
| @@ -24,6 +24,58 @@ const ( | |||||
| 24 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | 24 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | ||
| 25 | ) | 25 | ) | ||
| 26 | 26 | ||||
| 27 | + | // WorkflowState tells whether a workflow file starts runs. | |||
| 28 | + | type WorkflowState int32 | |||
| 29 | + | ||||
| 30 | + | const ( | |||
| 31 | + | WorkflowState_WORKFLOW_STATE_UNSPECIFIED WorkflowState = 0 | |||
| 32 | + | // The workflow starts runs for the events it declares. | |||
| 33 | + | WorkflowState_WORKFLOW_STATE_ENABLED WorkflowState = 1 | |||
| 34 | + | // The workflow starts no run for any event (DisableWorkflow). | |||
| 35 | + | WorkflowState_WORKFLOW_STATE_DISABLED WorkflowState = 2 | |||
| 36 | + | ) | |||
| 37 | + | ||||
| 38 | + | // Enum value maps for WorkflowState. | |||
| 39 | + | var ( | |||
| 40 | + | WorkflowState_name = map[int32]string{ | |||
| 41 | + | 0: "WORKFLOW_STATE_UNSPECIFIED", | |||
| 42 | + | 1: "WORKFLOW_STATE_ENABLED", | |||
| 43 | + | 2: "WORKFLOW_STATE_DISABLED", | |||
| 44 | + | } | |||
| 45 | + | WorkflowState_value = map[string]int32{ | |||
| 46 | + | "WORKFLOW_STATE_UNSPECIFIED": 0, | |||
| 47 | + | "WORKFLOW_STATE_ENABLED": 1, | |||
| 48 | + | "WORKFLOW_STATE_DISABLED": 2, | |||
| 49 | + | } | |||
| 50 | + | ) | |||
| 51 | + | ||||
| 52 | + | func (x WorkflowState) Enum() *WorkflowState { | |||
| 53 | + | p := new(WorkflowState) | |||
| 54 | + | *p = x | |||
| 55 | + | return p | |||
| 56 | + | } | |||
| 57 | + | ||||
| 58 | + | func (x WorkflowState) String() string { | |||
| 59 | + | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |||
| 60 | + | } | |||
| 61 | + | ||||
| 62 | + | func (WorkflowState) Descriptor() protoreflect.EnumDescriptor { | |||
| 63 | + | return file_ermite_run_proto_enumTypes[0].Descriptor() | |||
| 64 | + | } | |||
| 65 | + | ||||
| 66 | + | func (WorkflowState) Type() protoreflect.EnumType { | |||
| 67 | + | return &file_ermite_run_proto_enumTypes[0] | |||
| 68 | + | } | |||
| 69 | + | ||||
| 70 | + | func (x WorkflowState) Number() protoreflect.EnumNumber { | |||
| 71 | + | return protoreflect.EnumNumber(x) | |||
| 72 | + | } | |||
| 73 | + | ||||
| 74 | + | // Deprecated: Use WorkflowState.Descriptor instead. | |||
| 75 | + | func (WorkflowState) EnumDescriptor() ([]byte, []int) { | |||
| 76 | + | return file_ermite_run_proto_rawDescGZIP(), []int{0} | |||
| 77 | + | } | |||
| 78 | + | ||||
| 27 | // Run is one execution of one workflow file for one event, like a GitHub | 79 | // Run is one execution of one workflow file for one event, like a GitHub | ||
| 28 | // workflow run. A re-run keeps the run and adds an attempt. | 80 | // workflow run. A re-run keeps the run and adds an attempt. | ||
| 29 | type Run struct { | 81 | type Run struct { | ||
| @@ -2568,6 +2620,367 @@ func (*RemoveRunnerResponse) Descriptor() ([]byte, []int) { | |||||
| 2568 | return file_ermite_run_proto_rawDescGZIP(), []int{31} | 2620 | return file_ermite_run_proto_rawDescGZIP(), []int{31} | ||
| 2569 | } | 2621 | } | ||
| 2570 | 2622 | ||||
| 2623 | + | // Workflow is a workflow file of a repository and its state. | |||
| 2624 | + | type Workflow struct { | |||
| 2625 | + | state protoimpl.MessageState `protogen:"open.v1"` | |||
| 2626 | + | // Path is the path of the file, always ".github/workflows/<file>". | |||
| 2627 | + | Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` | |||
| 2628 | + | // Name is the "name:" of the workflow at the tip of the default branch, the | |||
| 2629 | + | // path when the file has none. Empty when the default branch has no such file | |||
| 2630 | + | // or it cannot be read as a workflow. | |||
| 2631 | + | Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` | |||
| 2632 | + | // State is ENABLED or DISABLED. | |||
| 2633 | + | State WorkflowState `protobuf:"varint,3,opt,name=state,proto3,enum=ermite.WorkflowState" json:"state,omitempty"` | |||
| 2634 | + | unknownFields protoimpl.UnknownFields | |||
| 2635 | + | sizeCache protoimpl.SizeCache | |||
| 2636 | + | } | |||
| 2637 | + | ||||
| 2638 | + | func (x *Workflow) Reset() { | |||
| 2639 | + | *x = Workflow{} | |||
| 2640 | + | mi := &file_ermite_run_proto_msgTypes[32] | |||
| 2641 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 2642 | + | ms.StoreMessageInfo(mi) | |||
| 2643 | + | } | |||
| 2644 | + | ||||
| 2645 | + | func (x *Workflow) String() string { | |||
| 2646 | + | return protoimpl.X.MessageStringOf(x) | |||
| 2647 | + | } | |||
| 2648 | + | ||||
| 2649 | + | func (*Workflow) ProtoMessage() {} | |||
| 2650 | + | ||||
| 2651 | + | func (x *Workflow) ProtoReflect() protoreflect.Message { | |||
| 2652 | + | mi := &file_ermite_run_proto_msgTypes[32] | |||
| 2653 | + | if x != nil { | |||
| 2654 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 2655 | + | if ms.LoadMessageInfo() == nil { | |||
| 2656 | + | ms.StoreMessageInfo(mi) | |||
| 2657 | + | } | |||
| 2658 | + | return ms | |||
| 2659 | + | } | |||
| 2660 | + | return mi.MessageOf(x) | |||
| 2661 | + | } | |||
| 2662 | + | ||||
| 2663 | + | // Deprecated: Use Workflow.ProtoReflect.Descriptor instead. | |||
| 2664 | + | func (*Workflow) Descriptor() ([]byte, []int) { | |||
| 2665 | + | return file_ermite_run_proto_rawDescGZIP(), []int{32} | |||
| 2666 | + | } | |||
| 2667 | + | ||||
| 2668 | + | func (x *Workflow) GetPath() string { | |||
| 2669 | + | if x != nil { | |||
| 2670 | + | return x.Path | |||
| 2671 | + | } | |||
| 2672 | + | return "" | |||
| 2673 | + | } | |||
| 2674 | + | ||||
| 2675 | + | func (x *Workflow) GetName() string { | |||
| 2676 | + | if x != nil { | |||
| 2677 | + | return x.Name | |||
| 2678 | + | } | |||
| 2679 | + | return "" | |||
| 2680 | + | } | |||
| 2681 | + | ||||
| 2682 | + | func (x *Workflow) GetState() WorkflowState { | |||
| 2683 | + | if x != nil { | |||
| 2684 | + | return x.State | |||
| 2685 | + | } | |||
| 2686 | + | return WorkflowState_WORKFLOW_STATE_UNSPECIFIED | |||
| 2687 | + | } | |||
| 2688 | + | ||||
| 2689 | + | // ListWorkflowsRequest names the repository. | |||
| 2690 | + | type ListWorkflowsRequest struct { | |||
| 2691 | + | state protoimpl.MessageState `protogen:"open.v1"` | |||
| 2692 | + | // Repo is the repository name. | |||
| 2693 | + | Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` | |||
| 2694 | + | unknownFields protoimpl.UnknownFields | |||
| 2695 | + | sizeCache protoimpl.SizeCache | |||
| 2696 | + | } | |||
| 2697 | + | ||||
| 2698 | + | func (x *ListWorkflowsRequest) Reset() { | |||
| 2699 | + | *x = ListWorkflowsRequest{} | |||
| 2700 | + | mi := &file_ermite_run_proto_msgTypes[33] | |||
| 2701 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 2702 | + | ms.StoreMessageInfo(mi) | |||
| 2703 | + | } | |||
| 2704 | + | ||||
| 2705 | + | func (x *ListWorkflowsRequest) String() string { | |||
| 2706 | + | return protoimpl.X.MessageStringOf(x) | |||
| 2707 | + | } | |||
| 2708 | + | ||||
| 2709 | + | func (*ListWorkflowsRequest) ProtoMessage() {} | |||
| 2710 | + | ||||
| 2711 | + | func (x *ListWorkflowsRequest) ProtoReflect() protoreflect.Message { | |||
| 2712 | + | mi := &file_ermite_run_proto_msgTypes[33] | |||
| 2713 | + | if x != nil { | |||
| 2714 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 2715 | + | if ms.LoadMessageInfo() == nil { | |||
| 2716 | + | ms.StoreMessageInfo(mi) | |||
| 2717 | + | } | |||
| 2718 | + | return ms | |||
| 2719 | + | } | |||
| 2720 | + | return mi.MessageOf(x) | |||
| 2721 | + | } | |||
| 2722 | + | ||||
| 2723 | + | // Deprecated: Use ListWorkflowsRequest.ProtoReflect.Descriptor instead. | |||
| 2724 | + | func (*ListWorkflowsRequest) Descriptor() ([]byte, []int) { | |||
| 2725 | + | return file_ermite_run_proto_rawDescGZIP(), []int{33} | |||
| 2726 | + | } | |||
| 2727 | + | ||||
| 2728 | + | func (x *ListWorkflowsRequest) GetRepo() string { | |||
| 2729 | + | if x != nil { | |||
| 2730 | + | return x.Repo | |||
| 2731 | + | } | |||
| 2732 | + | return "" | |||
| 2733 | + | } | |||
| 2734 | + | ||||
| 2735 | + | // ListWorkflowsResponse holds the workflows of a repository, ordered by path. | |||
| 2736 | + | type ListWorkflowsResponse struct { | |||
| 2737 | + | state protoimpl.MessageState `protogen:"open.v1"` | |||
| 2738 | + | Workflows []*Workflow `protobuf:"bytes,1,rep,name=workflows,proto3" json:"workflows,omitempty"` | |||
| 2739 | + | unknownFields protoimpl.UnknownFields | |||
| 2740 | + | sizeCache protoimpl.SizeCache | |||
| 2741 | + | } | |||
| 2742 | + | ||||
| 2743 | + | func (x *ListWorkflowsResponse) Reset() { | |||
| 2744 | + | *x = ListWorkflowsResponse{} | |||
| 2745 | + | mi := &file_ermite_run_proto_msgTypes[34] | |||
| 2746 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 2747 | + | ms.StoreMessageInfo(mi) | |||
| 2748 | + | } | |||
| 2749 | + | ||||
| 2750 | + | func (x *ListWorkflowsResponse) String() string { | |||
| 2751 | + | return protoimpl.X.MessageStringOf(x) | |||
| 2752 | + | } | |||
| 2753 | + | ||||
| 2754 | + | func (*ListWorkflowsResponse) ProtoMessage() {} | |||
| 2755 | + | ||||
| 2756 | + | func (x *ListWorkflowsResponse) ProtoReflect() protoreflect.Message { | |||
| 2757 | + | mi := &file_ermite_run_proto_msgTypes[34] | |||
| 2758 | + | if x != nil { | |||
| 2759 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 2760 | + | if ms.LoadMessageInfo() == nil { | |||
| 2761 | + | ms.StoreMessageInfo(mi) | |||
| 2762 | + | } | |||
| 2763 | + | return ms | |||
| 2764 | + | } | |||
| 2765 | + | return mi.MessageOf(x) | |||
| 2766 | + | } | |||
| 2767 | + | ||||
| 2768 | + | // Deprecated: Use ListWorkflowsResponse.ProtoReflect.Descriptor instead. | |||
| 2769 | + | func (*ListWorkflowsResponse) Descriptor() ([]byte, []int) { | |||
| 2770 | + | return file_ermite_run_proto_rawDescGZIP(), []int{34} | |||
| 2771 | + | } | |||
| 2772 | + | ||||
| 2773 | + | func (x *ListWorkflowsResponse) GetWorkflows() []*Workflow { | |||
| 2774 | + | if x != nil { | |||
| 2775 | + | return x.Workflows | |||
| 2776 | + | } | |||
| 2777 | + | return nil | |||
| 2778 | + | } | |||
| 2779 | + | ||||
| 2780 | + | // DisableWorkflowRequest names the workflow to disable. | |||
| 2781 | + | type DisableWorkflowRequest struct { | |||
| 2782 | + | state protoimpl.MessageState `protogen:"open.v1"` | |||
| 2783 | + | // Repo is the repository name. | |||
| 2784 | + | Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` | |||
| 2785 | + | // Workflow is the path of the file (".github/workflows/release.yml") or its | |||
| 2786 | + | // file name ("release.yml"). The file does not have to exist. | |||
| 2787 | + | Workflow string `protobuf:"bytes,2,opt,name=workflow,proto3" json:"workflow,omitempty"` | |||
| 2788 | + | unknownFields protoimpl.UnknownFields | |||
| 2789 | + | sizeCache protoimpl.SizeCache | |||
| 2790 | + | } | |||
| 2791 | + | ||||
| 2792 | + | func (x *DisableWorkflowRequest) Reset() { | |||
| 2793 | + | *x = DisableWorkflowRequest{} | |||
| 2794 | + | mi := &file_ermite_run_proto_msgTypes[35] | |||
| 2795 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 2796 | + | ms.StoreMessageInfo(mi) | |||
| 2797 | + | } | |||
| 2798 | + | ||||
| 2799 | + | func (x *DisableWorkflowRequest) String() string { | |||
| 2800 | + | return protoimpl.X.MessageStringOf(x) | |||
| 2801 | + | } | |||
| 2802 | + | ||||
| 2803 | + | func (*DisableWorkflowRequest) ProtoMessage() {} | |||
| 2804 | + | ||||
| 2805 | + | func (x *DisableWorkflowRequest) ProtoReflect() protoreflect.Message { | |||
| 2806 | + | mi := &file_ermite_run_proto_msgTypes[35] | |||
| 2807 | + | if x != nil { | |||
| 2808 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 2809 | + | if ms.LoadMessageInfo() == nil { | |||
| 2810 | + | ms.StoreMessageInfo(mi) | |||
| 2811 | + | } | |||
| 2812 | + | return ms | |||
| 2813 | + | } | |||
| 2814 | + | return mi.MessageOf(x) | |||
| 2815 | + | } | |||
| 2816 | + | ||||
| 2817 | + | // Deprecated: Use DisableWorkflowRequest.ProtoReflect.Descriptor instead. | |||
| 2818 | + | func (*DisableWorkflowRequest) Descriptor() ([]byte, []int) { | |||
| 2819 | + | return file_ermite_run_proto_rawDescGZIP(), []int{35} | |||
| 2820 | + | } | |||
| 2821 | + | ||||
| 2822 | + | func (x *DisableWorkflowRequest) GetRepo() string { | |||
| 2823 | + | if x != nil { | |||
| 2824 | + | return x.Repo | |||
| 2825 | + | } | |||
| 2826 | + | return "" | |||
| 2827 | + | } | |||
| 2828 | + | ||||
| 2829 | + | func (x *DisableWorkflowRequest) GetWorkflow() string { | |||
| 2830 | + | if x != nil { | |||
| 2831 | + | return x.Workflow | |||
| 2832 | + | } | |||
| 2833 | + | return "" | |||
| 2834 | + | } | |||
| 2835 | + | ||||
| 2836 | + | // DisableWorkflowResponse holds the workflow after the change. | |||
| 2837 | + | type DisableWorkflowResponse struct { | |||
| 2838 | + | state protoimpl.MessageState `protogen:"open.v1"` | |||
| 2839 | + | // Workflow has the normalized path and state DISABLED. | |||
| 2840 | + | Workflow *Workflow `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` | |||
| 2841 | + | unknownFields protoimpl.UnknownFields | |||
| 2842 | + | sizeCache protoimpl.SizeCache | |||
| 2843 | + | } | |||
| 2844 | + | ||||
| 2845 | + | func (x *DisableWorkflowResponse) Reset() { | |||
| 2846 | + | *x = DisableWorkflowResponse{} | |||
| 2847 | + | mi := &file_ermite_run_proto_msgTypes[36] | |||
| 2848 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 2849 | + | ms.StoreMessageInfo(mi) | |||
| 2850 | + | } | |||
| 2851 | + | ||||
| 2852 | + | func (x *DisableWorkflowResponse) String() string { | |||
| 2853 | + | return protoimpl.X.MessageStringOf(x) | |||
| 2854 | + | } | |||
| 2855 | + | ||||
| 2856 | + | func (*DisableWorkflowResponse) ProtoMessage() {} | |||
| 2857 | + | ||||
| 2858 | + | func (x *DisableWorkflowResponse) ProtoReflect() protoreflect.Message { | |||
| 2859 | + | mi := &file_ermite_run_proto_msgTypes[36] | |||
| 2860 | + | if x != nil { | |||
| 2861 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 2862 | + | if ms.LoadMessageInfo() == nil { | |||
| 2863 | + | ms.StoreMessageInfo(mi) | |||
| 2864 | + | } | |||
| 2865 | + | return ms | |||
| 2866 | + | } | |||
| 2867 | + | return mi.MessageOf(x) | |||
| 2868 | + | } | |||
| 2869 | + | ||||
| 2870 | + | // Deprecated: Use DisableWorkflowResponse.ProtoReflect.Descriptor instead. | |||
| 2871 | + | func (*DisableWorkflowResponse) Descriptor() ([]byte, []int) { | |||
| 2872 | + | return file_ermite_run_proto_rawDescGZIP(), []int{36} | |||
| 2873 | + | } | |||
| 2874 | + | ||||
| 2875 | + | func (x *DisableWorkflowResponse) GetWorkflow() *Workflow { | |||
| 2876 | + | if x != nil { | |||
| 2877 | + | return x.Workflow | |||
| 2878 | + | } | |||
| 2879 | + | return nil | |||
| 2880 | + | } | |||
| 2881 | + | ||||
| 2882 | + | // EnableWorkflowRequest names the workflow to enable. | |||
| 2883 | + | type EnableWorkflowRequest struct { | |||
| 2884 | + | state protoimpl.MessageState `protogen:"open.v1"` | |||
| 2885 | + | // Repo is the repository name. | |||
| 2886 | + | Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` | |||
| 2887 | + | // Workflow is the path of the file or its file name, as in | |||
| 2888 | + | // DisableWorkflowRequest. | |||
| 2889 | + | Workflow string `protobuf:"bytes,2,opt,name=workflow,proto3" json:"workflow,omitempty"` | |||
| 2890 | + | unknownFields protoimpl.UnknownFields | |||
| 2891 | + | sizeCache protoimpl.SizeCache | |||
| 2892 | + | } | |||
| 2893 | + | ||||
| 2894 | + | func (x *EnableWorkflowRequest) Reset() { | |||
| 2895 | + | *x = EnableWorkflowRequest{} | |||
| 2896 | + | mi := &file_ermite_run_proto_msgTypes[37] | |||
| 2897 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 2898 | + | ms.StoreMessageInfo(mi) | |||
| 2899 | + | } | |||
| 2900 | + | ||||
| 2901 | + | func (x *EnableWorkflowRequest) String() string { | |||
| 2902 | + | return protoimpl.X.MessageStringOf(x) | |||
| 2903 | + | } | |||
| 2904 | + | ||||
| 2905 | + | func (*EnableWorkflowRequest) ProtoMessage() {} | |||
| 2906 | + | ||||
| 2907 | + | func (x *EnableWorkflowRequest) ProtoReflect() protoreflect.Message { | |||
| 2908 | + | mi := &file_ermite_run_proto_msgTypes[37] | |||
| 2909 | + | if x != nil { | |||
| 2910 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 2911 | + | if ms.LoadMessageInfo() == nil { | |||
| 2912 | + | ms.StoreMessageInfo(mi) | |||
| 2913 | + | } | |||
| 2914 | + | return ms | |||
| 2915 | + | } | |||
| 2916 | + | return mi.MessageOf(x) | |||
| 2917 | + | } | |||
| 2918 | + | ||||
| 2919 | + | // Deprecated: Use EnableWorkflowRequest.ProtoReflect.Descriptor instead. | |||
| 2920 | + | func (*EnableWorkflowRequest) Descriptor() ([]byte, []int) { | |||
| 2921 | + | return file_ermite_run_proto_rawDescGZIP(), []int{37} | |||
| 2922 | + | } | |||
| 2923 | + | ||||
| 2924 | + | func (x *EnableWorkflowRequest) GetRepo() string { | |||
| 2925 | + | if x != nil { | |||
| 2926 | + | return x.Repo | |||
| 2927 | + | } | |||
| 2928 | + | return "" | |||
| 2929 | + | } | |||
| 2930 | + | ||||
| 2931 | + | func (x *EnableWorkflowRequest) GetWorkflow() string { | |||
| 2932 | + | if x != nil { | |||
| 2933 | + | return x.Workflow | |||
| 2934 | + | } | |||
| 2935 | + | return "" | |||
| 2936 | + | } | |||
| 2937 | + | ||||
| 2938 | + | // EnableWorkflowResponse holds the workflow after the change. | |||
| 2939 | + | type EnableWorkflowResponse struct { | |||
| 2940 | + | state protoimpl.MessageState `protogen:"open.v1"` | |||
| 2941 | + | // Workflow has the normalized path and state ENABLED. | |||
| 2942 | + | Workflow *Workflow `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` | |||
| 2943 | + | unknownFields protoimpl.UnknownFields | |||
| 2944 | + | sizeCache protoimpl.SizeCache | |||
| 2945 | + | } | |||
| 2946 | + | ||||
| 2947 | + | func (x *EnableWorkflowResponse) Reset() { | |||
| 2948 | + | *x = EnableWorkflowResponse{} | |||
| 2949 | + | mi := &file_ermite_run_proto_msgTypes[38] | |||
| 2950 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 2951 | + | ms.StoreMessageInfo(mi) | |||
| 2952 | + | } | |||
| 2953 | + | ||||
| 2954 | + | func (x *EnableWorkflowResponse) String() string { | |||
| 2955 | + | return protoimpl.X.MessageStringOf(x) | |||
| 2956 | + | } | |||
| 2957 | + | ||||
| 2958 | + | func (*EnableWorkflowResponse) ProtoMessage() {} | |||
| 2959 | + | ||||
| 2960 | + | func (x *EnableWorkflowResponse) ProtoReflect() protoreflect.Message { | |||
| 2961 | + | mi := &file_ermite_run_proto_msgTypes[38] | |||
| 2962 | + | if x != nil { | |||
| 2963 | + | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |||
| 2964 | + | if ms.LoadMessageInfo() == nil { | |||
| 2965 | + | ms.StoreMessageInfo(mi) | |||
| 2966 | + | } | |||
| 2967 | + | return ms | |||
| 2968 | + | } | |||
| 2969 | + | return mi.MessageOf(x) | |||
| 2970 | + | } | |||
| 2971 | + | ||||
| 2972 | + | // Deprecated: Use EnableWorkflowResponse.ProtoReflect.Descriptor instead. | |||
| 2973 | + | func (*EnableWorkflowResponse) Descriptor() ([]byte, []int) { | |||
| 2974 | + | return file_ermite_run_proto_rawDescGZIP(), []int{38} | |||
| 2975 | + | } | |||
| 2976 | + | ||||
| 2977 | + | func (x *EnableWorkflowResponse) GetWorkflow() *Workflow { | |||
| 2978 | + | if x != nil { | |||
| 2979 | + | return x.Workflow | |||
| 2980 | + | } | |||
| 2981 | + | return nil | |||
| 2982 | + | } | |||
| 2983 | + | ||||
| 2571 | var File_ermite_run_proto protoreflect.FileDescriptor | 2984 | var File_ermite_run_proto protoreflect.FileDescriptor | ||
| 2572 | 2985 | ||||
| 2573 | const file_ermite_run_proto_rawDesc = "" + | 2986 | const file_ermite_run_proto_rawDesc = "" + | ||
| @@ -2770,7 +3183,29 @@ const file_ermite_run_proto_rawDesc = "" + | |||||
| 2770 | "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"2\n" + | 3183 | "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"2\n" + | ||
| 2771 | "\x13RemoveRunnerRequest\x12\x1b\n" + | 3184 | "\x13RemoveRunnerRequest\x12\x1b\n" + | ||
| 2772 | "\trunner_id\x18\x01 \x01(\tR\brunnerId\"\x16\n" + | 3185 | "\trunner_id\x18\x01 \x01(\tR\brunnerId\"\x16\n" + | ||
| 2773 | - | "\x14RemoveRunnerResponse2\xdc\x06\n" + | 3186 | + | "\x14RemoveRunnerResponse\"_\n" + |
| 3187 | + | "\bWorkflow\x12\x12\n" + | |||
| 3188 | + | "\x04path\x18\x01 \x01(\tR\x04path\x12\x12\n" + | |||
| 3189 | + | "\x04name\x18\x02 \x01(\tR\x04name\x12+\n" + | |||
| 3190 | + | "\x05state\x18\x03 \x01(\x0e2\x15.ermite.WorkflowStateR\x05state\"*\n" + | |||
| 3191 | + | "\x14ListWorkflowsRequest\x12\x12\n" + | |||
| 3192 | + | "\x04repo\x18\x01 \x01(\tR\x04repo\"G\n" + | |||
| 3193 | + | "\x15ListWorkflowsResponse\x12.\n" + | |||
| 3194 | + | "\tworkflows\x18\x01 \x03(\v2\x10.ermite.WorkflowR\tworkflows\"H\n" + | |||
| 3195 | + | "\x16DisableWorkflowRequest\x12\x12\n" + | |||
| 3196 | + | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x1a\n" + | |||
| 3197 | + | "\bworkflow\x18\x02 \x01(\tR\bworkflow\"G\n" + | |||
| 3198 | + | "\x17DisableWorkflowResponse\x12,\n" + | |||
| 3199 | + | "\bworkflow\x18\x01 \x01(\v2\x10.ermite.WorkflowR\bworkflow\"G\n" + | |||
| 3200 | + | "\x15EnableWorkflowRequest\x12\x12\n" + | |||
| 3201 | + | "\x04repo\x18\x01 \x01(\tR\x04repo\x12\x1a\n" + | |||
| 3202 | + | "\bworkflow\x18\x02 \x01(\tR\bworkflow\"F\n" + | |||
| 3203 | + | "\x16EnableWorkflowResponse\x12,\n" + | |||
| 3204 | + | "\bworkflow\x18\x01 \x01(\v2\x10.ermite.WorkflowR\bworkflow*h\n" + | |||
| 3205 | + | "\rWorkflowState\x12\x1e\n" + | |||
| 3206 | + | "\x1aWORKFLOW_STATE_UNSPECIFIED\x10\x00\x12\x1a\n" + | |||
| 3207 | + | "\x16WORKFLOW_STATE_ENABLED\x10\x01\x12\x1b\n" + | |||
| 3208 | + | "\x17WORKFLOW_STATE_DISABLED\x10\x022\xcf\b\n" + | |||
| 2774 | "\n" + | 3209 | "\n" + | ||
| 2775 | "RunService\x12=\n" + | 3210 | "RunService\x12=\n" + | ||
| 2776 | "\bListRuns\x12\x17.ermite.ListRunsRequest\x1a\x18.ermite.ListRunsResponse\x127\n" + | 3211 | "\bListRuns\x12\x17.ermite.ListRunsRequest\x1a\x18.ermite.ListRunsResponse\x127\n" + | ||
| @@ -2781,7 +3216,10 @@ const file_ermite_run_proto_rawDesc = "" + | |||||
| 2781 | "\tGetJobLog\x12\x18.ermite.GetJobLogRequest\x1a\x19.ermite.GetJobLogResponse0\x01\x12@\n" + | 3216 | "\tGetJobLog\x12\x18.ermite.GetJobLogRequest\x1a\x19.ermite.GetJobLogResponse0\x01\x12@\n" + | ||
| 2782 | "\tCancelRun\x12\x18.ermite.CancelRunRequest\x1a\x19.ermite.CancelRunResponse\x12=\n" + | 3217 | "\tCancelRun\x12\x18.ermite.CancelRunRequest\x1a\x19.ermite.CancelRunResponse\x12=\n" + | ||
| 2783 | "\bRerunRun\x12\x17.ermite.RerunRunRequest\x1a\x18.ermite.RerunRunResponse\x12U\n" + | 3218 | "\bRerunRun\x12\x17.ermite.RerunRunRequest\x1a\x18.ermite.RerunRunResponse\x12U\n" + | ||
| 2784 | - | "\x10DispatchWorkflow\x12\x1f.ermite.DispatchWorkflowRequest\x1a .ermite.DispatchWorkflowResponse\x12C\n" + | 3219 | + | "\x10DispatchWorkflow\x12\x1f.ermite.DispatchWorkflowRequest\x1a .ermite.DispatchWorkflowResponse\x12L\n" + |
| 3220 | + | "\rListWorkflows\x12\x1c.ermite.ListWorkflowsRequest\x1a\x1d.ermite.ListWorkflowsResponse\x12R\n" + | |||
| 3221 | + | "\x0fDisableWorkflow\x12\x1e.ermite.DisableWorkflowRequest\x1a\x1f.ermite.DisableWorkflowResponse\x12O\n" + | |||
| 3222 | + | "\x0eEnableWorkflow\x12\x1d.ermite.EnableWorkflowRequest\x1a\x1e.ermite.EnableWorkflowResponse\x12C\n" + | |||
| 2785 | "\n" + | 3223 | "\n" + | ||
| 2786 | "ListChecks\x12\x19.ermite.ListChecksRequest\x1a\x1a.ermite.ListChecksResponse\x12F\n" + | 3224 | "ListChecks\x12\x19.ermite.ListChecksRequest\x1a\x1a.ermite.ListChecksResponse\x12F\n" + | ||
| 2787 | "\vListRunners\x12\x1a.ermite.ListRunnersRequest\x1a\x1b.ermite.ListRunnersResponse\x12I\n" + | 3225 | "\vListRunners\x12\x1a.ermite.ListRunnersRequest\x1a\x1b.ermite.ListRunnersResponse\x12I\n" + | ||
| @@ -2801,118 +3239,137 @@ func file_ermite_run_proto_rawDescGZIP() []byte { | |||||
| 2801 | return file_ermite_run_proto_rawDescData | 3239 | return file_ermite_run_proto_rawDescData | ||
| 2802 | } | 3240 | } | ||
| 2803 | 3241 | ||||
| 2804 | - | var file_ermite_run_proto_msgTypes = make([]protoimpl.MessageInfo, 33) | 3242 | + | var file_ermite_run_proto_enumTypes = make([]protoimpl.EnumInfo, 1) |
| 3243 | + | var file_ermite_run_proto_msgTypes = make([]protoimpl.MessageInfo, 40) | |||
| 2805 | var file_ermite_run_proto_goTypes = []any{ | 3244 | var file_ermite_run_proto_goTypes = []any{ | ||
| 2806 | - | (*Run)(nil), // 0: ermite.Run | 3245 | + | (WorkflowState)(0), // 0: ermite.WorkflowState |
| 2807 | - | (*RunJob)(nil), // 1: ermite.RunJob | 3246 | + | (*Run)(nil), // 1: ermite.Run |
| 2808 | - | (*Step)(nil), // 2: ermite.Step | 3247 | + | (*RunJob)(nil), // 2: ermite.RunJob |
| 2809 | - | (*Check)(nil), // 3: ermite.Check | 3248 | + | (*Step)(nil), // 3: ermite.Step |
| 2810 | - | (*Runner)(nil), // 4: ermite.Runner | 3249 | + | (*Check)(nil), // 4: ermite.Check |
| 2811 | - | (*ListRunsRequest)(nil), // 5: ermite.ListRunsRequest | 3250 | + | (*Runner)(nil), // 5: ermite.Runner |
| 2812 | - | (*ListRunsResponse)(nil), // 6: ermite.ListRunsResponse | 3251 | + | (*ListRunsRequest)(nil), // 6: ermite.ListRunsRequest |
| 2813 | - | (*GetRunRequest)(nil), // 7: ermite.GetRunRequest | 3252 | + | (*ListRunsResponse)(nil), // 7: ermite.ListRunsResponse |
| 2814 | - | (*GetRunResponse)(nil), // 8: ermite.GetRunResponse | 3253 | + | (*GetRunRequest)(nil), // 8: ermite.GetRunRequest |
| 2815 | - | (*GetJobRequest)(nil), // 9: ermite.GetJobRequest | 3254 | + | (*GetRunResponse)(nil), // 9: ermite.GetRunResponse |
| 2816 | - | (*GetJobResponse)(nil), // 10: ermite.GetJobResponse | 3255 | + | (*GetJobRequest)(nil), // 10: ermite.GetJobRequest |
| 2817 | - | (*ListAnnotationsRequest)(nil), // 11: ermite.ListAnnotationsRequest | 3256 | + | (*GetJobResponse)(nil), // 11: ermite.GetJobResponse |
| 2818 | - | (*ListAnnotationsResponse)(nil), // 12: ermite.ListAnnotationsResponse | 3257 | + | (*ListAnnotationsRequest)(nil), // 12: ermite.ListAnnotationsRequest |
| 2819 | - | (*JobAnnotation)(nil), // 13: ermite.JobAnnotation | 3258 | + | (*ListAnnotationsResponse)(nil), // 13: ermite.ListAnnotationsResponse |
| 2820 | - | (*GetStepSummariesRequest)(nil), // 14: ermite.GetStepSummariesRequest | 3259 | + | (*JobAnnotation)(nil), // 14: ermite.JobAnnotation |
| 2821 | - | (*GetStepSummariesResponse)(nil), // 15: ermite.GetStepSummariesResponse | 3260 | + | (*GetStepSummariesRequest)(nil), // 15: ermite.GetStepSummariesRequest |
| 2822 | - | (*StepSummary)(nil), // 16: ermite.StepSummary | 3261 | + | (*GetStepSummariesResponse)(nil), // 16: ermite.GetStepSummariesResponse |
| 2823 | - | (*GetJobLogRequest)(nil), // 17: ermite.GetJobLogRequest | 3262 | + | (*StepSummary)(nil), // 17: ermite.StepSummary |
| 2824 | - | (*GetJobLogResponse)(nil), // 18: ermite.GetJobLogResponse | 3263 | + | (*GetJobLogRequest)(nil), // 18: ermite.GetJobLogRequest |
| 2825 | - | (*JobLogLine)(nil), // 19: ermite.JobLogLine | 3264 | + | (*GetJobLogResponse)(nil), // 19: ermite.GetJobLogResponse |
| 2826 | - | (*CancelRunRequest)(nil), // 20: ermite.CancelRunRequest | 3265 | + | (*JobLogLine)(nil), // 20: ermite.JobLogLine |
| 2827 | - | (*CancelRunResponse)(nil), // 21: ermite.CancelRunResponse | 3266 | + | (*CancelRunRequest)(nil), // 21: ermite.CancelRunRequest |
| 2828 | - | (*RerunRunRequest)(nil), // 22: ermite.RerunRunRequest | 3267 | + | (*CancelRunResponse)(nil), // 22: ermite.CancelRunResponse |
| 2829 | - | (*RerunRunResponse)(nil), // 23: ermite.RerunRunResponse | 3268 | + | (*RerunRunRequest)(nil), // 23: ermite.RerunRunRequest |
| 2830 | - | (*DispatchWorkflowRequest)(nil), // 24: ermite.DispatchWorkflowRequest | 3269 | + | (*RerunRunResponse)(nil), // 24: ermite.RerunRunResponse |
| 2831 | - | (*DispatchWorkflowResponse)(nil), // 25: ermite.DispatchWorkflowResponse | 3270 | + | (*DispatchWorkflowRequest)(nil), // 25: ermite.DispatchWorkflowRequest |
| 2832 | - | (*ListChecksRequest)(nil), // 26: ermite.ListChecksRequest | 3271 | + | (*DispatchWorkflowResponse)(nil), // 26: ermite.DispatchWorkflowResponse |
| 2833 | - | (*ListChecksResponse)(nil), // 27: ermite.ListChecksResponse | 3272 | + | (*ListChecksRequest)(nil), // 27: ermite.ListChecksRequest |
| 2834 | - | (*ListRunnersRequest)(nil), // 28: ermite.ListRunnersRequest | 3273 | + | (*ListChecksResponse)(nil), // 28: ermite.ListChecksResponse |
| 2835 | - | (*ListRunnersResponse)(nil), // 29: ermite.ListRunnersResponse | 3274 | + | (*ListRunnersRequest)(nil), // 29: ermite.ListRunnersRequest |
| 2836 | - | (*RemoveRunnerRequest)(nil), // 30: ermite.RemoveRunnerRequest | 3275 | + | (*ListRunnersResponse)(nil), // 30: ermite.ListRunnersResponse |
| 2837 | - | (*RemoveRunnerResponse)(nil), // 31: ermite.RemoveRunnerResponse | 3276 | + | (*RemoveRunnerRequest)(nil), // 31: ermite.RemoveRunnerRequest |
| 2838 | - | nil, // 32: ermite.DispatchWorkflowRequest.InputsEntry | 3277 | + | (*RemoveRunnerResponse)(nil), // 32: ermite.RemoveRunnerResponse |
| 2839 | - | (CiStatus)(0), // 33: ermite.CiStatus | 3278 | + | (*Workflow)(nil), // 33: ermite.Workflow |
| 2840 | - | (CiConclusion)(0), // 34: ermite.CiConclusion | 3279 | + | (*ListWorkflowsRequest)(nil), // 34: ermite.ListWorkflowsRequest |
| 2841 | - | (*timestamppb.Timestamp)(nil), // 35: google.protobuf.Timestamp | 3280 | + | (*ListWorkflowsResponse)(nil), // 35: ermite.ListWorkflowsResponse |
| 2842 | - | (RunnerIsolation)(0), // 36: ermite.RunnerIsolation | 3281 | + | (*DisableWorkflowRequest)(nil), // 36: ermite.DisableWorkflowRequest |
| 2843 | - | (StepState)(0), // 37: ermite.StepState | 3282 | + | (*DisableWorkflowResponse)(nil), // 37: ermite.DisableWorkflowResponse |
| 2844 | - | (*Annotation)(nil), // 38: ermite.Annotation | 3283 | + | (*EnableWorkflowRequest)(nil), // 38: ermite.EnableWorkflowRequest |
| 3284 | + | (*EnableWorkflowResponse)(nil), // 39: ermite.EnableWorkflowResponse | |||
| 3285 | + | nil, // 40: ermite.DispatchWorkflowRequest.InputsEntry | |||
| 3286 | + | (CiStatus)(0), // 41: ermite.CiStatus | |||
| 3287 | + | (CiConclusion)(0), // 42: ermite.CiConclusion | |||
| 3288 | + | (*timestamppb.Timestamp)(nil), // 43: google.protobuf.Timestamp | |||
| 3289 | + | (RunnerIsolation)(0), // 44: ermite.RunnerIsolation | |||
| 3290 | + | (StepState)(0), // 45: ermite.StepState | |||
| 3291 | + | (*Annotation)(nil), // 46: ermite.Annotation | |||
| 2845 | } | 3292 | } | ||
| 2846 | var file_ermite_run_proto_depIdxs = []int32{ | 3293 | var file_ermite_run_proto_depIdxs = []int32{ | ||
| 2847 | - | 33, // 0: ermite.Run.status:type_name -> ermite.CiStatus | 3294 | + | 41, // 0: ermite.Run.status:type_name -> ermite.CiStatus |
| 2848 | - | 34, // 1: ermite.Run.conclusion:type_name -> ermite.CiConclusion | 3295 | + | 42, // 1: ermite.Run.conclusion:type_name -> ermite.CiConclusion |
| 2849 | - | 35, // 2: ermite.Run.created_at:type_name -> google.protobuf.Timestamp | 3296 | + | 43, // 2: ermite.Run.created_at:type_name -> google.protobuf.Timestamp |
| 2850 | - | 35, // 3: ermite.Run.started_at:type_name -> google.protobuf.Timestamp | 3297 | + | 43, // 3: ermite.Run.started_at:type_name -> google.protobuf.Timestamp |
| 2851 | - | 35, // 4: ermite.Run.completed_at:type_name -> google.protobuf.Timestamp | 3298 | + | 43, // 4: ermite.Run.completed_at:type_name -> google.protobuf.Timestamp |
| 2852 | - | 33, // 5: ermite.RunJob.status:type_name -> ermite.CiStatus | 3299 | + | 41, // 5: ermite.RunJob.status:type_name -> ermite.CiStatus |
| 2853 | - | 34, // 6: ermite.RunJob.conclusion:type_name -> ermite.CiConclusion | 3300 | + | 42, // 6: ermite.RunJob.conclusion:type_name -> ermite.CiConclusion |
| 2854 | - | 36, // 7: ermite.RunJob.isolation:type_name -> ermite.RunnerIsolation | 3301 | + | 44, // 7: ermite.RunJob.isolation:type_name -> ermite.RunnerIsolation |
| 2855 | - | 2, // 8: ermite.RunJob.steps:type_name -> ermite.Step | 3302 | + | 3, // 8: ermite.RunJob.steps:type_name -> ermite.Step |
| 2856 | - | 35, // 9: ermite.RunJob.created_at:type_name -> google.protobuf.Timestamp | 3303 | + | 43, // 9: ermite.RunJob.created_at:type_name -> google.protobuf.Timestamp |
| 2857 | - | 35, // 10: ermite.RunJob.started_at:type_name -> google.protobuf.Timestamp | 3304 | + | 43, // 10: ermite.RunJob.started_at:type_name -> google.protobuf.Timestamp |
| 2858 | - | 35, // 11: ermite.RunJob.completed_at:type_name -> google.protobuf.Timestamp | 3305 | + | 43, // 11: ermite.RunJob.completed_at:type_name -> google.protobuf.Timestamp |
| 2859 | - | 37, // 12: ermite.Step.state:type_name -> ermite.StepState | 3306 | + | 45, // 12: ermite.Step.state:type_name -> ermite.StepState |
| 2860 | - | 34, // 13: ermite.Step.conclusion:type_name -> ermite.CiConclusion | 3307 | + | 42, // 13: ermite.Step.conclusion:type_name -> ermite.CiConclusion |
| 2861 | - | 35, // 14: ermite.Step.started_at:type_name -> google.protobuf.Timestamp | 3308 | + | 43, // 14: ermite.Step.started_at:type_name -> google.protobuf.Timestamp |
| 2862 | - | 35, // 15: ermite.Step.completed_at:type_name -> google.protobuf.Timestamp | 3309 | + | 43, // 15: ermite.Step.completed_at:type_name -> google.protobuf.Timestamp |
| 2863 | - | 34, // 16: ermite.Step.outcome:type_name -> ermite.CiConclusion | 3310 | + | 42, // 16: ermite.Step.outcome:type_name -> ermite.CiConclusion |
| 2864 | - | 33, // 17: ermite.Check.status:type_name -> ermite.CiStatus | 3311 | + | 41, // 17: ermite.Check.status:type_name -> ermite.CiStatus |
| 2865 | - | 34, // 18: ermite.Check.conclusion:type_name -> ermite.CiConclusion | 3312 | + | 42, // 18: ermite.Check.conclusion:type_name -> ermite.CiConclusion |
| 2866 | - | 35, // 19: ermite.Check.started_at:type_name -> google.protobuf.Timestamp | 3313 | + | 43, // 19: ermite.Check.started_at:type_name -> google.protobuf.Timestamp |
| 2867 | - | 35, // 20: ermite.Check.completed_at:type_name -> google.protobuf.Timestamp | 3314 | + | 43, // 20: ermite.Check.completed_at:type_name -> google.protobuf.Timestamp |
| 2868 | - | 36, // 21: ermite.Runner.isolation:type_name -> ermite.RunnerIsolation | 3315 | + | 44, // 21: ermite.Runner.isolation:type_name -> ermite.RunnerIsolation |
| 2869 | - | 35, // 22: ermite.Runner.registered_at:type_name -> google.protobuf.Timestamp | 3316 | + | 43, // 22: ermite.Runner.registered_at:type_name -> google.protobuf.Timestamp |
| 2870 | - | 35, // 23: ermite.Runner.last_seen:type_name -> google.protobuf.Timestamp | 3317 | + | 43, // 23: ermite.Runner.last_seen:type_name -> google.protobuf.Timestamp |
| 2871 | - | 33, // 24: ermite.ListRunsRequest.status:type_name -> ermite.CiStatus | 3318 | + | 41, // 24: ermite.ListRunsRequest.status:type_name -> ermite.CiStatus |
| 2872 | - | 0, // 25: ermite.ListRunsResponse.runs:type_name -> ermite.Run | 3319 | + | 1, // 25: ermite.ListRunsResponse.runs:type_name -> ermite.Run |
| 2873 | - | 0, // 26: ermite.GetRunResponse.run:type_name -> ermite.Run | 3320 | + | 1, // 26: ermite.GetRunResponse.run:type_name -> ermite.Run |
| 2874 | - | 1, // 27: ermite.GetRunResponse.jobs:type_name -> ermite.RunJob | 3321 | + | 2, // 27: ermite.GetRunResponse.jobs:type_name -> ermite.RunJob |
| 2875 | - | 1, // 28: ermite.GetJobResponse.job:type_name -> ermite.RunJob | 3322 | + | 2, // 28: ermite.GetJobResponse.job:type_name -> ermite.RunJob |
| 2876 | - | 13, // 29: ermite.ListAnnotationsResponse.annotations:type_name -> ermite.JobAnnotation | 3323 | + | 14, // 29: ermite.ListAnnotationsResponse.annotations:type_name -> ermite.JobAnnotation |
| 2877 | - | 38, // 30: ermite.JobAnnotation.annotation:type_name -> ermite.Annotation | 3324 | + | 46, // 30: ermite.JobAnnotation.annotation:type_name -> ermite.Annotation |
| 2878 | - | 16, // 31: ermite.GetStepSummariesResponse.summaries:type_name -> ermite.StepSummary | 3325 | + | 17, // 31: ermite.GetStepSummariesResponse.summaries:type_name -> ermite.StepSummary |
| 2879 | - | 19, // 32: ermite.GetJobLogResponse.lines:type_name -> ermite.JobLogLine | 3326 | + | 20, // 32: ermite.GetJobLogResponse.lines:type_name -> ermite.JobLogLine |
| 2880 | - | 35, // 33: ermite.JobLogLine.time:type_name -> google.protobuf.Timestamp | 3327 | + | 43, // 33: ermite.JobLogLine.time:type_name -> google.protobuf.Timestamp |
| 2881 | - | 0, // 34: ermite.CancelRunResponse.run:type_name -> ermite.Run | 3328 | + | 1, // 34: ermite.CancelRunResponse.run:type_name -> ermite.Run |
| 2882 | - | 0, // 35: ermite.RerunRunResponse.run:type_name -> ermite.Run | 3329 | + | 1, // 35: ermite.RerunRunResponse.run:type_name -> ermite.Run |
| 2883 | - | 32, // 36: ermite.DispatchWorkflowRequest.inputs:type_name -> ermite.DispatchWorkflowRequest.InputsEntry | 3330 | + | 40, // 36: ermite.DispatchWorkflowRequest.inputs:type_name -> ermite.DispatchWorkflowRequest.InputsEntry |
| 2884 | - | 0, // 37: ermite.DispatchWorkflowResponse.run:type_name -> ermite.Run | 3331 | + | 1, // 37: ermite.DispatchWorkflowResponse.run:type_name -> ermite.Run |
| 2885 | - | 3, // 38: ermite.ListChecksResponse.checks:type_name -> ermite.Check | 3332 | + | 4, // 38: ermite.ListChecksResponse.checks:type_name -> ermite.Check |
| 2886 | - | 4, // 39: ermite.ListRunnersResponse.runners:type_name -> ermite.Runner | 3333 | + | 5, // 39: ermite.ListRunnersResponse.runners:type_name -> ermite.Runner |
| 2887 | - | 5, // 40: ermite.RunService.ListRuns:input_type -> ermite.ListRunsRequest | 3334 | + | 0, // 40: ermite.Workflow.state:type_name -> ermite.WorkflowState |
| 2888 | - | 7, // 41: ermite.RunService.GetRun:input_type -> ermite.GetRunRequest | 3335 | + | 33, // 41: ermite.ListWorkflowsResponse.workflows:type_name -> ermite.Workflow |
| 2889 | - | 9, // 42: ermite.RunService.GetJob:input_type -> ermite.GetJobRequest | 3336 | + | 33, // 42: ermite.DisableWorkflowResponse.workflow:type_name -> ermite.Workflow |
| 2890 | - | 11, // 43: ermite.RunService.ListAnnotations:input_type -> ermite.ListAnnotationsRequest | 3337 | + | 33, // 43: ermite.EnableWorkflowResponse.workflow:type_name -> ermite.Workflow |
| 2891 | - | 14, // 44: ermite.RunService.GetStepSummaries:input_type -> ermite.GetStepSummariesRequest | 3338 | + | 6, // 44: ermite.RunService.ListRuns:input_type -> ermite.ListRunsRequest |
| 2892 | - | 17, // 45: ermite.RunService.GetJobLog:input_type -> ermite.GetJobLogRequest | 3339 | + | 8, // 45: ermite.RunService.GetRun:input_type -> ermite.GetRunRequest |
| 2893 | - | 20, // 46: ermite.RunService.CancelRun:input_type -> ermite.CancelRunRequest | 3340 | + | 10, // 46: ermite.RunService.GetJob:input_type -> ermite.GetJobRequest |
| 2894 | - | 22, // 47: ermite.RunService.RerunRun:input_type -> ermite.RerunRunRequest | 3341 | + | 12, // 47: ermite.RunService.ListAnnotations:input_type -> ermite.ListAnnotationsRequest |
| 2895 | - | 24, // 48: ermite.RunService.DispatchWorkflow:input_type -> ermite.DispatchWorkflowRequest | 3342 | + | 15, // 48: ermite.RunService.GetStepSummaries:input_type -> ermite.GetStepSummariesRequest |
| 2896 | - | 26, // 49: ermite.RunService.ListChecks:input_type -> ermite.ListChecksRequest | 3343 | + | 18, // 49: ermite.RunService.GetJobLog:input_type -> ermite.GetJobLogRequest |
| 2897 | - | 28, // 50: ermite.RunService.ListRunners:input_type -> ermite.ListRunnersRequest | 3344 | + | 21, // 50: ermite.RunService.CancelRun:input_type -> ermite.CancelRunRequest |
| 2898 | - | 30, // 51: ermite.RunService.RemoveRunner:input_type -> ermite.RemoveRunnerRequest | 3345 | + | 23, // 51: ermite.RunService.RerunRun:input_type -> ermite.RerunRunRequest |
| 2899 | - | 6, // 52: ermite.RunService.ListRuns:output_type -> ermite.ListRunsResponse | 3346 | + | 25, // 52: ermite.RunService.DispatchWorkflow:input_type -> ermite.DispatchWorkflowRequest |
| 2900 | - | 8, // 53: ermite.RunService.GetRun:output_type -> ermite.GetRunResponse | 3347 | + | 34, // 53: ermite.RunService.ListWorkflows:input_type -> ermite.ListWorkflowsRequest |
| 2901 | - | 10, // 54: ermite.RunService.GetJob:output_type -> ermite.GetJobResponse | 3348 | + | 36, // 54: ermite.RunService.DisableWorkflow:input_type -> ermite.DisableWorkflowRequest |
| 2902 | - | 12, // 55: ermite.RunService.ListAnnotations:output_type -> ermite.ListAnnotationsResponse | 3349 | + | 38, // 55: ermite.RunService.EnableWorkflow:input_type -> ermite.EnableWorkflowRequest |
| 2903 | - | 15, // 56: ermite.RunService.GetStepSummaries:output_type -> ermite.GetStepSummariesResponse | 3350 | + | 27, // 56: ermite.RunService.ListChecks:input_type -> ermite.ListChecksRequest |
| 2904 | - | 18, // 57: ermite.RunService.GetJobLog:output_type -> ermite.GetJobLogResponse | 3351 | + | 29, // 57: ermite.RunService.ListRunners:input_type -> ermite.ListRunnersRequest |
| 2905 | - | 21, // 58: ermite.RunService.CancelRun:output_type -> ermite.CancelRunResponse | 3352 | + | 31, // 58: ermite.RunService.RemoveRunner:input_type -> ermite.RemoveRunnerRequest |
| 2906 | - | 23, // 59: ermite.RunService.RerunRun:output_type -> ermite.RerunRunResponse | 3353 | + | 7, // 59: ermite.RunService.ListRuns:output_type -> ermite.ListRunsResponse |
| 2907 | - | 25, // 60: ermite.RunService.DispatchWorkflow:output_type -> ermite.DispatchWorkflowResponse | 3354 | + | 9, // 60: ermite.RunService.GetRun:output_type -> ermite.GetRunResponse |
| 2908 | - | 27, // 61: ermite.RunService.ListChecks:output_type -> ermite.ListChecksResponse | 3355 | + | 11, // 61: ermite.RunService.GetJob:output_type -> ermite.GetJobResponse |
| 2909 | - | 29, // 62: ermite.RunService.ListRunners:output_type -> ermite.ListRunnersResponse | 3356 | + | 13, // 62: ermite.RunService.ListAnnotations:output_type -> ermite.ListAnnotationsResponse |
| 2910 | - | 31, // 63: ermite.RunService.RemoveRunner:output_type -> ermite.RemoveRunnerResponse | 3357 | + | 16, // 63: ermite.RunService.GetStepSummaries:output_type -> ermite.GetStepSummariesResponse |
| 2911 | - | 52, // [52:64] is the sub-list for method output_type | 3358 | + | 19, // 64: ermite.RunService.GetJobLog:output_type -> ermite.GetJobLogResponse |
| 2912 | - | 40, // [40:52] is the sub-list for method input_type | 3359 | + | 22, // 65: ermite.RunService.CancelRun:output_type -> ermite.CancelRunResponse |
| 2913 | - | 40, // [40:40] is the sub-list for extension type_name | 3360 | + | 24, // 66: ermite.RunService.RerunRun:output_type -> ermite.RerunRunResponse |
| 2914 | - | 40, // [40:40] is the sub-list for extension extendee | 3361 | + | 26, // 67: ermite.RunService.DispatchWorkflow:output_type -> ermite.DispatchWorkflowResponse |
| 2915 | - | 0, // [0:40] is the sub-list for field type_name | 3362 | + | 35, // 68: ermite.RunService.ListWorkflows:output_type -> ermite.ListWorkflowsResponse |
| 3363 | + | 37, // 69: ermite.RunService.DisableWorkflow:output_type -> ermite.DisableWorkflowResponse | |||
| 3364 | + | 39, // 70: ermite.RunService.EnableWorkflow:output_type -> ermite.EnableWorkflowResponse | |||
| 3365 | + | 28, // 71: ermite.RunService.ListChecks:output_type -> ermite.ListChecksResponse | |||
| 3366 | + | 30, // 72: ermite.RunService.ListRunners:output_type -> ermite.ListRunnersResponse | |||
| 3367 | + | 32, // 73: ermite.RunService.RemoveRunner:output_type -> ermite.RemoveRunnerResponse | |||
| 3368 | + | 59, // [59:74] is the sub-list for method output_type | |||
| 3369 | + | 44, // [44:59] is the sub-list for method input_type | |||
| 3370 | + | 44, // [44:44] is the sub-list for extension type_name | |||
| 3371 | + | 44, // [44:44] is the sub-list for extension extendee | |||
| 3372 | + | 0, // [0:44] is the sub-list for field type_name | |||
| 2916 | } | 3373 | } | ||
| 2917 | 3374 | ||||
| 2918 | func init() { file_ermite_run_proto_init() } | 3375 | func init() { file_ermite_run_proto_init() } | ||
| @@ -2926,13 +3383,14 @@ func file_ermite_run_proto_init() { | |||||
| 2926 | File: protoimpl.DescBuilder{ | 3383 | File: protoimpl.DescBuilder{ | ||
| 2927 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | 3384 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | ||
| 2928 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_run_proto_rawDesc), len(file_ermite_run_proto_rawDesc)), | 3385 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_run_proto_rawDesc), len(file_ermite_run_proto_rawDesc)), | ||
| 2929 | - | NumEnums: 0, | 3386 | + | NumEnums: 1, |
| 2930 | - | NumMessages: 33, | 3387 | + | NumMessages: 40, |
| 2931 | NumExtensions: 0, | 3388 | NumExtensions: 0, | ||
| 2932 | NumServices: 1, | 3389 | NumServices: 1, | ||
| 2933 | }, | 3390 | }, | ||
| 2934 | GoTypes: file_ermite_run_proto_goTypes, | 3391 | GoTypes: file_ermite_run_proto_goTypes, | ||
| 2935 | DependencyIndexes: file_ermite_run_proto_depIdxs, | 3392 | DependencyIndexes: file_ermite_run_proto_depIdxs, | ||
| 3393 | + | EnumInfos: file_ermite_run_proto_enumTypes, | |||
| 2936 | MessageInfos: file_ermite_run_proto_msgTypes, | 3394 | MessageInfos: file_ermite_run_proto_msgTypes, | ||
| 2937 | }.Build() | 3395 | }.Build() | ||
| 2938 | File_ermite_run_proto = out.File | 3396 | File_ermite_run_proto = out.File | ||
M gen_test.go +13 -0
| @@ -66,6 +66,9 @@ func TestProcedures(t *testing.T) { | |||
| 66 | 66 | {ermiteconnect.RunServiceCancelRunProcedure, "/ermite.RunService/CancelRun"}, | |
| 67 | 67 | {ermiteconnect.RunServiceRerunRunProcedure, "/ermite.RunService/RerunRun"}, | |
| 68 | 68 | {ermiteconnect.RunServiceDispatchWorkflowProcedure, "/ermite.RunService/DispatchWorkflow"}, | |
| 69 | + | {ermiteconnect.RunServiceListWorkflowsProcedure, "/ermite.RunService/ListWorkflows"}, | |
| 70 | + | {ermiteconnect.RunServiceDisableWorkflowProcedure, "/ermite.RunService/DisableWorkflow"}, | |
| 71 | + | {ermiteconnect.RunServiceEnableWorkflowProcedure, "/ermite.RunService/EnableWorkflow"}, | |
| 69 | 72 | {ermiteconnect.RunServiceListChecksProcedure, "/ermite.RunService/ListChecks"}, | |
| 70 | 73 | {ermiteconnect.RunServiceListRunnersProcedure, "/ermite.RunService/ListRunners"}, | |
| 71 | 74 | {ermiteconnect.RunServiceRemoveRunnerProcedure, "/ermite.RunService/RemoveRunner"}, | |
| @@ -489,6 +492,13 @@ func TestCI3FieldNumbers(t *testing.T) { | |||
| 489 | 492 | {&ermite.RunJob{}, map[string]int{"concurrency_group": 20}}, | |
| 490 | 493 | {&ermite.DispatchWorkflowRequest{}, map[string]int{"repo": 1, "workflow_path": 2, "ref": 3, "inputs": 4}}, | |
| 491 | 494 | {&ermite.DispatchWorkflowResponse{}, map[string]int{"run": 1}}, | |
| 495 | + | {&ermite.Workflow{}, map[string]int{"path": 1, "name": 2, "state": 3}}, | |
| 496 | + | {&ermite.ListWorkflowsRequest{}, map[string]int{"repo": 1}}, | |
| 497 | + | {&ermite.ListWorkflowsResponse{}, map[string]int{"workflows": 1}}, | |
| 498 | + | {&ermite.DisableWorkflowRequest{}, map[string]int{"repo": 1, "workflow": 2}}, | |
| 499 | + | {&ermite.DisableWorkflowResponse{}, map[string]int{"workflow": 1}}, | |
| 500 | + | {&ermite.EnableWorkflowRequest{}, map[string]int{"repo": 1, "workflow": 2}}, | |
| 501 | + | {&ermite.EnableWorkflowResponse{}, map[string]int{"workflow": 1}}, | |
| 492 | 502 | {&ermite.SettingsScope{}, map[string]int{"instance": 1, "repo": 2, "environment": 3}}, | |
| 493 | 503 | {&ermite.EnvironmentRef{}, map[string]int{"repo": 1, "name": 2}}, | |
| 494 | 504 | {&ermite.Secret{}, map[string]int{"name": 1, "updated_at": 2}}, | |
| @@ -527,6 +537,9 @@ func TestCI3RoundTrip(t *testing.T) { | |||
| 527 | 537 | &ermite.RunJob{Id: "j1", Status: ermite.CiStatus_CI_STATUS_PENDING, ConcurrencyGroup: "deploy"}, | |
| 528 | 538 | &ermite.DispatchWorkflowRequest{Repo: "ermite", WorkflowPath: "ci.yml", Ref: "main", Inputs: map[string]string{"debug": "true"}}, | |
| 529 | 539 | &ermite.DispatchWorkflowResponse{Run: &ermite.Run{Id: 9, Event: "workflow_dispatch"}}, | |
| 540 | + | &ermite.ListWorkflowsResponse{Workflows: []*ermite.Workflow{{Path: ".github/workflows/release.yml", Name: "Release", State: ermite.WorkflowState_WORKFLOW_STATE_DISABLED}}}, | |
| 541 | + | &ermite.DisableWorkflowRequest{Repo: "ermite", Workflow: "release.yml"}, | |
| 542 | + | &ermite.EnableWorkflowResponse{Workflow: &ermite.Workflow{Path: ".github/workflows/release.yml", State: ermite.WorkflowState_WORKFLOW_STATE_ENABLED}}, | |
| 530 | 543 | &ermite.SetSecretRequest{Scope: &ermite.SettingsScope{Where: &ermite.SettingsScope_Instance{Instance: true}}, Name: "A", Value: "v"}, | |
| 531 | 544 | &ermite.SetSecretRequest{Scope: &ermite.SettingsScope{Where: &ermite.SettingsScope_Repo{Repo: "ermite"}}, Name: "A", Value: "v"}, | |
| 532 | 545 | &ermite.SetVariableRequest{ | |
| @@ -66,6 +66,9 @@ func TestProcedures(t *testing.T) { | |||||
| 66 | {ermiteconnect.RunServiceCancelRunProcedure, "/ermite.RunService/CancelRun"}, | 66 | {ermiteconnect.RunServiceCancelRunProcedure, "/ermite.RunService/CancelRun"}, | ||
| 67 | {ermiteconnect.RunServiceRerunRunProcedure, "/ermite.RunService/RerunRun"}, | 67 | {ermiteconnect.RunServiceRerunRunProcedure, "/ermite.RunService/RerunRun"}, | ||
| 68 | {ermiteconnect.RunServiceDispatchWorkflowProcedure, "/ermite.RunService/DispatchWorkflow"}, | 68 | {ermiteconnect.RunServiceDispatchWorkflowProcedure, "/ermite.RunService/DispatchWorkflow"}, | ||
| 69 | + | {ermiteconnect.RunServiceListWorkflowsProcedure, "/ermite.RunService/ListWorkflows"}, | |||
| 70 | + | {ermiteconnect.RunServiceDisableWorkflowProcedure, "/ermite.RunService/DisableWorkflow"}, | |||
| 71 | + | {ermiteconnect.RunServiceEnableWorkflowProcedure, "/ermite.RunService/EnableWorkflow"}, | |||
| 69 | {ermiteconnect.RunServiceListChecksProcedure, "/ermite.RunService/ListChecks"}, | 72 | {ermiteconnect.RunServiceListChecksProcedure, "/ermite.RunService/ListChecks"}, | ||
| 70 | {ermiteconnect.RunServiceListRunnersProcedure, "/ermite.RunService/ListRunners"}, | 73 | {ermiteconnect.RunServiceListRunnersProcedure, "/ermite.RunService/ListRunners"}, | ||
| 71 | {ermiteconnect.RunServiceRemoveRunnerProcedure, "/ermite.RunService/RemoveRunner"}, | 74 | {ermiteconnect.RunServiceRemoveRunnerProcedure, "/ermite.RunService/RemoveRunner"}, | ||
| @@ -489,6 +492,13 @@ func TestCI3FieldNumbers(t *testing.T) { | |||||
| 489 | {&ermite.RunJob{}, map[string]int{"concurrency_group": 20}}, | 492 | {&ermite.RunJob{}, map[string]int{"concurrency_group": 20}}, | ||
| 490 | {&ermite.DispatchWorkflowRequest{}, map[string]int{"repo": 1, "workflow_path": 2, "ref": 3, "inputs": 4}}, | 493 | {&ermite.DispatchWorkflowRequest{}, map[string]int{"repo": 1, "workflow_path": 2, "ref": 3, "inputs": 4}}, | ||
| 491 | {&ermite.DispatchWorkflowResponse{}, map[string]int{"run": 1}}, | 494 | {&ermite.DispatchWorkflowResponse{}, map[string]int{"run": 1}}, | ||
| 495 | + | {&ermite.Workflow{}, map[string]int{"path": 1, "name": 2, "state": 3}}, | |||
| 496 | + | {&ermite.ListWorkflowsRequest{}, map[string]int{"repo": 1}}, | |||
| 497 | + | {&ermite.ListWorkflowsResponse{}, map[string]int{"workflows": 1}}, | |||
| 498 | + | {&ermite.DisableWorkflowRequest{}, map[string]int{"repo": 1, "workflow": 2}}, | |||
| 499 | + | {&ermite.DisableWorkflowResponse{}, map[string]int{"workflow": 1}}, | |||
| 500 | + | {&ermite.EnableWorkflowRequest{}, map[string]int{"repo": 1, "workflow": 2}}, | |||
| 501 | + | {&ermite.EnableWorkflowResponse{}, map[string]int{"workflow": 1}}, | |||
| 492 | {&ermite.SettingsScope{}, map[string]int{"instance": 1, "repo": 2, "environment": 3}}, | 502 | {&ermite.SettingsScope{}, map[string]int{"instance": 1, "repo": 2, "environment": 3}}, | ||
| 493 | {&ermite.EnvironmentRef{}, map[string]int{"repo": 1, "name": 2}}, | 503 | {&ermite.EnvironmentRef{}, map[string]int{"repo": 1, "name": 2}}, | ||
| 494 | {&ermite.Secret{}, map[string]int{"name": 1, "updated_at": 2}}, | 504 | {&ermite.Secret{}, map[string]int{"name": 1, "updated_at": 2}}, | ||
| @@ -527,6 +537,9 @@ func TestCI3RoundTrip(t *testing.T) { | |||||
| 527 | &ermite.RunJob{Id: "j1", Status: ermite.CiStatus_CI_STATUS_PENDING, ConcurrencyGroup: "deploy"}, | 537 | &ermite.RunJob{Id: "j1", Status: ermite.CiStatus_CI_STATUS_PENDING, ConcurrencyGroup: "deploy"}, | ||
| 528 | &ermite.DispatchWorkflowRequest{Repo: "ermite", WorkflowPath: "ci.yml", Ref: "main", Inputs: map[string]string{"debug": "true"}}, | 538 | &ermite.DispatchWorkflowRequest{Repo: "ermite", WorkflowPath: "ci.yml", Ref: "main", Inputs: map[string]string{"debug": "true"}}, | ||
| 529 | &ermite.DispatchWorkflowResponse{Run: &ermite.Run{Id: 9, Event: "workflow_dispatch"}}, | 539 | &ermite.DispatchWorkflowResponse{Run: &ermite.Run{Id: 9, Event: "workflow_dispatch"}}, | ||
| 540 | + | &ermite.ListWorkflowsResponse{Workflows: []*ermite.Workflow{{Path: ".github/workflows/release.yml", Name: "Release", State: ermite.WorkflowState_WORKFLOW_STATE_DISABLED}}}, | |||
| 541 | + | &ermite.DisableWorkflowRequest{Repo: "ermite", Workflow: "release.yml"}, | |||
| 542 | + | &ermite.EnableWorkflowResponse{Workflow: &ermite.Workflow{Path: ".github/workflows/release.yml", State: ermite.WorkflowState_WORKFLOW_STATE_ENABLED}}, | |||
| 530 | &ermite.SetSecretRequest{Scope: &ermite.SettingsScope{Where: &ermite.SettingsScope_Instance{Instance: true}}, Name: "A", Value: "v"}, | 543 | &ermite.SetSecretRequest{Scope: &ermite.SettingsScope{Where: &ermite.SettingsScope_Instance{Instance: true}}, Name: "A", Value: "v"}, | ||
| 531 | &ermite.SetSecretRequest{Scope: &ermite.SettingsScope{Where: &ermite.SettingsScope_Repo{Repo: "ermite"}}, Name: "A", Value: "v"}, | 544 | &ermite.SetSecretRequest{Scope: &ermite.SettingsScope{Where: &ermite.SettingsScope_Repo{Repo: "ermite"}}, Name: "A", Value: "v"}, | ||
| 532 | &ermite.SetVariableRequest{ | 545 | &ermite.SetVariableRequest{ | ||
M proto/ermite/run.proto +96 -2
| @@ -282,14 +282,16 @@ message Runner { | |||
| 282 | 282 | // request (other fields must be unchanged). | |
| 283 | 283 | // | |
| 284 | 284 | // Servers that implement the runs side (every RPC but ListRunners, | |
| 285 | - | // RemoveRunner, ListAnnotations, GetStepSummaries and DispatchWorkflow) list | |
| 285 | + | // RemoveRunner, ListAnnotations, GetStepSummaries, DispatchWorkflow and the | |
| 286 | + | // workflow state RPCs) list | |
| 286 | 287 | // "ci.runs" in | |
| 287 | 288 | // GetVersionResponse.features; those that | |
| 288 | 289 | // implement the runners side list "ci.runners", as RunnerService does. A server | |
| 289 | 290 | // that honours the filters of ListRunsRequest also lists "ci.runs.filters". | |
| 290 | 291 | // ListAnnotations needs "ci.annotations" and GetStepSummaries "ci.summaries", | |
| 291 | 292 | // which are also the features of the runner side of each. DispatchWorkflow | |
| 292 | - | // needs "ci.dispatch". RunJob.concurrency_group and CI_STATUS_PENDING belong | |
| 293 | + | // needs "ci.dispatch". ListWorkflows, DisableWorkflow and EnableWorkflow need | |
| 294 | + | // "ci.workflows". RunJob.concurrency_group and CI_STATUS_PENDING belong | |
| 293 | 295 | // to "ci.concurrency", Run.trusted to "ci.secrets". | |
| 294 | 296 | service RunService { | |
| 295 | 297 | // ListRuns lists the runs of a repository, highest id (newest) first. Each | |
| @@ -371,6 +373,36 @@ service RunService { | |||
| 371 | 373 | // missing while required without default, or has a value of the wrong type | |
| 372 | 374 | // or outside its choices, or if the workflow file is not valid. | |
| 373 | 375 | rpc DispatchWorkflow(DispatchWorkflowRequest) returns (DispatchWorkflowResponse); | |
| 376 | + | // ListWorkflows lists the workflow files of a repository with their state, | |
| 377 | + | // like `gh workflow list --all`, ordered by path: the files of | |
| 378 | + | // .github/workflows at the tip of the default branch, and the files that are | |
| 379 | + | // disabled even if the default branch has no such file (a repository that | |
| 380 | + | // is empty, or a file not pushed yet). Needs the same access as reading the | |
| 381 | + | // repository. A repository without a default branch lists only its disabled | |
| 382 | + | // files. Only servers with the feature "ci.workflows" implement it | |
| 383 | + | // (unimplemented otherwise). Fails with not_found if the repository does not | |
| 384 | + | // exist or cannot be read. | |
| 385 | + | rpc ListWorkflows(ListWorkflowsRequest) returns (ListWorkflowsResponse); | |
| 386 | + | // DisableWorkflow disables a workflow file of a repository, like `gh | |
| 387 | + | // workflow disable`: no event starts a run of it any more (push, | |
| 388 | + | // pull_request, pull_request_target, schedule, workflow_run, create, | |
| 389 | + | // delete, and workflow_dispatch). Runs already started are not affected. | |
| 390 | + | // The state belongs to the repository and to the file path, not to a | |
| 391 | + | // commit or a branch, and the file does not have to exist: it can be set on | |
| 392 | + | // an empty repository, before the first push. Disabling a disabled workflow | |
| 393 | + | // succeeds and changes nothing. Needs the repo:admin scope on the | |
| 394 | + | // repository, and a token that is not limited to branch prefixes. Only | |
| 395 | + | // servers with the feature "ci.workflows" implement it (unimplemented | |
| 396 | + | // otherwise). Fails with not_found if the repository does not exist or the | |
| 397 | + | // caller cannot read it, permission_denied without the scope, and | |
| 398 | + | // invalid_argument if the workflow is not a file name or a path of | |
| 399 | + | // .github/workflows ending in .yml or .yaml. | |
| 400 | + | rpc DisableWorkflow(DisableWorkflowRequest) returns (DisableWorkflowResponse); | |
| 401 | + | // EnableWorkflow undoes DisableWorkflow, like `gh workflow enable`. Enabling | |
| 402 | + | // a workflow that is not disabled succeeds and changes nothing. Same access | |
| 403 | + | // and errors as DisableWorkflow. Events that happened while the workflow was | |
| 404 | + | // disabled are not replayed. | |
| 405 | + | rpc EnableWorkflow(EnableWorkflowRequest) returns (EnableWorkflowResponse); | |
| 374 | 406 | // ListChecks lists the checks of a commit: for each job of each run on that | |
| 375 | 407 | // sha, the one of the latest attempt, ordered by creation time then name. | |
| 376 | 408 | // A commit without a run has no check: the list is empty, which is not an | |
| @@ -661,3 +693,65 @@ message RemoveRunnerRequest { | |||
| 661 | 693 | ||
| 662 | 694 | // RemoveRunnerResponse is empty. | |
| 663 | 695 | message RemoveRunnerResponse {} | |
| 696 | + | ||
| 697 | + | // WorkflowState tells whether a workflow file starts runs. | |
| 698 | + | enum WorkflowState { | |
| 699 | + | WORKFLOW_STATE_UNSPECIFIED = 0; | |
| 700 | + | // The workflow starts runs for the events it declares. | |
| 701 | + | WORKFLOW_STATE_ENABLED = 1; | |
| 702 | + | // The workflow starts no run for any event (DisableWorkflow). | |
| 703 | + | WORKFLOW_STATE_DISABLED = 2; | |
| 704 | + | } | |
| 705 | + | ||
| 706 | + | // Workflow is a workflow file of a repository and its state. | |
| 707 | + | message Workflow { | |
| 708 | + | // Path is the path of the file, always ".github/workflows/<file>". | |
| 709 | + | string path = 1; | |
| 710 | + | // Name is the "name:" of the workflow at the tip of the default branch, the | |
| 711 | + | // path when the file has none. Empty when the default branch has no such file | |
| 712 | + | // or it cannot be read as a workflow. | |
| 713 | + | string name = 2; | |
| 714 | + | // State is ENABLED or DISABLED. | |
| 715 | + | WorkflowState state = 3; | |
| 716 | + | } | |
| 717 | + | ||
| 718 | + | // ListWorkflowsRequest names the repository. | |
| 719 | + | message ListWorkflowsRequest { | |
| 720 | + | // Repo is the repository name. | |
| 721 | + | string repo = 1; | |
| 722 | + | } | |
| 723 | + | ||
| 724 | + | // ListWorkflowsResponse holds the workflows of a repository, ordered by path. | |
| 725 | + | message ListWorkflowsResponse { | |
| 726 | + | repeated Workflow workflows = 1; | |
| 727 | + | } | |
| 728 | + | ||
| 729 | + | // DisableWorkflowRequest names the workflow to disable. | |
| 730 | + | message DisableWorkflowRequest { | |
| 731 | + | // Repo is the repository name. | |
| 732 | + | string repo = 1; | |
| 733 | + | // Workflow is the path of the file (".github/workflows/release.yml") or its | |
| 734 | + | // file name ("release.yml"). The file does not have to exist. | |
| 735 | + | string workflow = 2; | |
| 736 | + | } | |
| 737 | + | ||
| 738 | + | // DisableWorkflowResponse holds the workflow after the change. | |
| 739 | + | message DisableWorkflowResponse { | |
| 740 | + | // Workflow has the normalized path and state DISABLED. | |
| 741 | + | Workflow workflow = 1; | |
| 742 | + | } | |
| 743 | + | ||
| 744 | + | // EnableWorkflowRequest names the workflow to enable. | |
| 745 | + | message EnableWorkflowRequest { | |
| 746 | + | // Repo is the repository name. | |
| 747 | + | string repo = 1; | |
| 748 | + | // Workflow is the path of the file or its file name, as in | |
| 749 | + | // DisableWorkflowRequest. | |
| 750 | + | string workflow = 2; | |
| 751 | + | } | |
| 752 | + | ||
| 753 | + | // EnableWorkflowResponse holds the workflow after the change. | |
| 754 | + | message EnableWorkflowResponse { | |
| 755 | + | // Workflow has the normalized path and state ENABLED. | |
| 756 | + | Workflow workflow = 1; | |
| 757 | + | } | |
| @@ -282,14 +282,16 @@ message Runner { | |||||
| 282 | // request (other fields must be unchanged). | 282 | // request (other fields must be unchanged). | ||
| 283 | // | 283 | // | ||
| 284 | // Servers that implement the runs side (every RPC but ListRunners, | 284 | // Servers that implement the runs side (every RPC but ListRunners, | ||
| 285 | - | // RemoveRunner, ListAnnotations, GetStepSummaries and DispatchWorkflow) list | 285 | + | // RemoveRunner, ListAnnotations, GetStepSummaries, DispatchWorkflow and the |
| 286 | + | // workflow state RPCs) list | |||
| 286 | // "ci.runs" in | 287 | // "ci.runs" in | ||
| 287 | // GetVersionResponse.features; those that | 288 | // GetVersionResponse.features; those that | ||
| 288 | // implement the runners side list "ci.runners", as RunnerService does. A server | 289 | // implement the runners side list "ci.runners", as RunnerService does. A server | ||
| 289 | // that honours the filters of ListRunsRequest also lists "ci.runs.filters". | 290 | // that honours the filters of ListRunsRequest also lists "ci.runs.filters". | ||
| 290 | // ListAnnotations needs "ci.annotations" and GetStepSummaries "ci.summaries", | 291 | // ListAnnotations needs "ci.annotations" and GetStepSummaries "ci.summaries", | ||
| 291 | // which are also the features of the runner side of each. DispatchWorkflow | 292 | // which are also the features of the runner side of each. DispatchWorkflow | ||
| 292 | - | // needs "ci.dispatch". RunJob.concurrency_group and CI_STATUS_PENDING belong | 293 | + | // needs "ci.dispatch". ListWorkflows, DisableWorkflow and EnableWorkflow need |
| 294 | + | // "ci.workflows". RunJob.concurrency_group and CI_STATUS_PENDING belong | |||
| 293 | // to "ci.concurrency", Run.trusted to "ci.secrets". | 295 | // to "ci.concurrency", Run.trusted to "ci.secrets". | ||
| 294 | service RunService { | 296 | service RunService { | ||
| 295 | // ListRuns lists the runs of a repository, highest id (newest) first. Each | 297 | // ListRuns lists the runs of a repository, highest id (newest) first. Each | ||
| @@ -371,6 +373,36 @@ service RunService { | |||||
| 371 | // missing while required without default, or has a value of the wrong type | 373 | // missing while required without default, or has a value of the wrong type | ||
| 372 | // or outside its choices, or if the workflow file is not valid. | 374 | // or outside its choices, or if the workflow file is not valid. | ||
| 373 | rpc DispatchWorkflow(DispatchWorkflowRequest) returns (DispatchWorkflowResponse); | 375 | rpc DispatchWorkflow(DispatchWorkflowRequest) returns (DispatchWorkflowResponse); | ||
| 376 | + | // ListWorkflows lists the workflow files of a repository with their state, | |||
| 377 | + | // like `gh workflow list --all`, ordered by path: the files of | |||
| 378 | + | // .github/workflows at the tip of the default branch, and the files that are | |||
| 379 | + | // disabled even if the default branch has no such file (a repository that | |||
| 380 | + | // is empty, or a file not pushed yet). Needs the same access as reading the | |||
| 381 | + | // repository. A repository without a default branch lists only its disabled | |||
| 382 | + | // files. Only servers with the feature "ci.workflows" implement it | |||
| 383 | + | // (unimplemented otherwise). Fails with not_found if the repository does not | |||
| 384 | + | // exist or cannot be read. | |||
| 385 | + | rpc ListWorkflows(ListWorkflowsRequest) returns (ListWorkflowsResponse); | |||
| 386 | + | // DisableWorkflow disables a workflow file of a repository, like `gh | |||
| 387 | + | // workflow disable`: no event starts a run of it any more (push, | |||
| 388 | + | // pull_request, pull_request_target, schedule, workflow_run, create, | |||
| 389 | + | // delete, and workflow_dispatch). Runs already started are not affected. | |||
| 390 | + | // The state belongs to the repository and to the file path, not to a | |||
| 391 | + | // commit or a branch, and the file does not have to exist: it can be set on | |||
| 392 | + | // an empty repository, before the first push. Disabling a disabled workflow | |||
| 393 | + | // succeeds and changes nothing. Needs the repo:admin scope on the | |||
| 394 | + | // repository, and a token that is not limited to branch prefixes. Only | |||
| 395 | + | // servers with the feature "ci.workflows" implement it (unimplemented | |||
| 396 | + | // otherwise). Fails with not_found if the repository does not exist or the | |||
| 397 | + | // caller cannot read it, permission_denied without the scope, and | |||
| 398 | + | // invalid_argument if the workflow is not a file name or a path of | |||
| 399 | + | // .github/workflows ending in .yml or .yaml. | |||
| 400 | + | rpc DisableWorkflow(DisableWorkflowRequest) returns (DisableWorkflowResponse); | |||
| 401 | + | // EnableWorkflow undoes DisableWorkflow, like `gh workflow enable`. Enabling | |||
| 402 | + | // a workflow that is not disabled succeeds and changes nothing. Same access | |||
| 403 | + | // and errors as DisableWorkflow. Events that happened while the workflow was | |||
| 404 | + | // disabled are not replayed. | |||
| 405 | + | rpc EnableWorkflow(EnableWorkflowRequest) returns (EnableWorkflowResponse); | |||
| 374 | // ListChecks lists the checks of a commit: for each job of each run on that | 406 | // ListChecks lists the checks of a commit: for each job of each run on that | ||
| 375 | // sha, the one of the latest attempt, ordered by creation time then name. | 407 | // sha, the one of the latest attempt, ordered by creation time then name. | ||
| 376 | // A commit without a run has no check: the list is empty, which is not an | 408 | // A commit without a run has no check: the list is empty, which is not an | ||
| @@ -661,3 +693,65 @@ message RemoveRunnerRequest { | |||||
| 661 | 693 | ||||
| 662 | // RemoveRunnerResponse is empty. | 694 | // RemoveRunnerResponse is empty. | ||
| 663 | message RemoveRunnerResponse {} | 695 | message RemoveRunnerResponse {} | ||
| 696 | + | ||||
| 697 | + | // WorkflowState tells whether a workflow file starts runs. | |||
| 698 | + | enum WorkflowState { | |||
| 699 | + | WORKFLOW_STATE_UNSPECIFIED = 0; | |||
| 700 | + | // The workflow starts runs for the events it declares. | |||
| 701 | + | WORKFLOW_STATE_ENABLED = 1; | |||
| 702 | + | // The workflow starts no run for any event (DisableWorkflow). | |||
| 703 | + | WORKFLOW_STATE_DISABLED = 2; | |||
| 704 | + | } | |||
| 705 | + | ||||
| 706 | + | // Workflow is a workflow file of a repository and its state. | |||
| 707 | + | message Workflow { | |||
| 708 | + | // Path is the path of the file, always ".github/workflows/<file>". | |||
| 709 | + | string path = 1; | |||
| 710 | + | // Name is the "name:" of the workflow at the tip of the default branch, the | |||
| 711 | + | // path when the file has none. Empty when the default branch has no such file | |||
| 712 | + | // or it cannot be read as a workflow. | |||
| 713 | + | string name = 2; | |||
| 714 | + | // State is ENABLED or DISABLED. | |||
| 715 | + | WorkflowState state = 3; | |||
| 716 | + | } | |||
| 717 | + | ||||
| 718 | + | // ListWorkflowsRequest names the repository. | |||
| 719 | + | message ListWorkflowsRequest { | |||
| 720 | + | // Repo is the repository name. | |||
| 721 | + | string repo = 1; | |||
| 722 | + | } | |||
| 723 | + | ||||
| 724 | + | // ListWorkflowsResponse holds the workflows of a repository, ordered by path. | |||
| 725 | + | message ListWorkflowsResponse { | |||
| 726 | + | repeated Workflow workflows = 1; | |||
| 727 | + | } | |||
| 728 | + | ||||
| 729 | + | // DisableWorkflowRequest names the workflow to disable. | |||
| 730 | + | message DisableWorkflowRequest { | |||
| 731 | + | // Repo is the repository name. | |||
| 732 | + | string repo = 1; | |||
| 733 | + | // Workflow is the path of the file (".github/workflows/release.yml") or its | |||
| 734 | + | // file name ("release.yml"). The file does not have to exist. | |||
| 735 | + | string workflow = 2; | |||
| 736 | + | } | |||
| 737 | + | ||||
| 738 | + | // DisableWorkflowResponse holds the workflow after the change. | |||
| 739 | + | message DisableWorkflowResponse { | |||
| 740 | + | // Workflow has the normalized path and state DISABLED. | |||
| 741 | + | Workflow workflow = 1; | |||
| 742 | + | } | |||
| 743 | + | ||||
| 744 | + | // EnableWorkflowRequest names the workflow to enable. | |||
| 745 | + | message EnableWorkflowRequest { | |||
| 746 | + | // Repo is the repository name. | |||
| 747 | + | string repo = 1; | |||
| 748 | + | // Workflow is the path of the file or its file name, as in | |||
| 749 | + | // DisableWorkflowRequest. | |||
| 750 | + | string workflow = 2; | |||
| 751 | + | } | |||
| 752 | + | ||||
| 753 | + | // EnableWorkflowResponse holds the workflow after the change. | |||
| 754 | + | message EnableWorkflowResponse { | |||
| 755 | + | // Workflow has the normalized path and state ENABLED. | |||
| 756 | + | Workflow workflow = 1; | |||
| 757 | + | } | |||