mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
feat(api): return run_number
in workflow dispatch (#7286)
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Has been skipped
testing / frontend-checks (push) Has been skipped
testing / test-unit (push) Has been skipped
testing / test-e2e (push) Has been skipped
testing / test-mysql (push) Has been skipped
testing / test-pgsql (push) Has been skipped
testing / test-sqlite (push) Has been skipped
testing / test-remote-cacher (redis) (push) Has been skipped
testing / test-remote-cacher (valkey) (push) Has been skipped
testing / security-check (push) Has been skipped
testing / test-remote-cacher (garnet) (push) Has been skipped
testing / test-remote-cacher (redict) (push) Has been skipped
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Has been skipped
testing / frontend-checks (push) Has been skipped
testing / test-unit (push) Has been skipped
testing / test-e2e (push) Has been skipped
testing / test-mysql (push) Has been skipped
testing / test-pgsql (push) Has been skipped
testing / test-sqlite (push) Has been skipped
testing / test-remote-cacher (redis) (push) Has been skipped
testing / test-remote-cacher (valkey) (push) Has been skipped
testing / security-check (push) Has been skipped
testing / test-remote-cacher (garnet) (push) Has been skipped
testing / test-remote-cacher (redict) (push) Has been skipped
- This is a follow up on #7193 and resolves #6312. - The ID by itself is not very useful, so also return the index of the workflow run. Co-authored-by: Klaus Fyhn <klausfyhn@gmail.com> Co-authored-by: Klaus Fyhn <klfj@mir-robots.com> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7286 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: klausfyhn <klausfyhn@noreply.codeberg.org> Co-committed-by: klausfyhn <klausfyhn@noreply.codeberg.org>
This commit is contained in:
parent
513319c1ec
commit
c531b8f020
4 changed files with 76 additions and 2 deletions
|
@ -640,6 +640,8 @@ func DispatchWorkflow(ctx *context.APIContext) {
|
|||
// schema:
|
||||
// "$ref": "#/definitions/DispatchWorkflowOption"
|
||||
// responses:
|
||||
// "201":
|
||||
// "$ref": "#/responses/DispatchWorkflowRun"
|
||||
// "204":
|
||||
// "$ref": "#/responses/empty"
|
||||
// "404":
|
||||
|
@ -681,8 +683,9 @@ func DispatchWorkflow(ctx *context.APIContext) {
|
|||
}
|
||||
|
||||
workflowRun := &api.DispatchWorkflowRun{
|
||||
ID: run.ID,
|
||||
Jobs: jobs,
|
||||
ID: run.ID,
|
||||
RunNumber: run.Index,
|
||||
Jobs: jobs,
|
||||
}
|
||||
|
||||
if opt.ReturnRunInfo {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue