feat(api): return run_number in workflow dispatch (#7286)

- 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:
klausfyhn 2025-03-25 21:22:32 +00:00 committed by Gusted
parent 513319c1ec
commit c531b8f020
4 changed files with 76 additions and 2 deletions

View file

@ -22,6 +22,8 @@ type DispatchWorkflowOption struct {
type DispatchWorkflowRun struct {
// the workflow run id
ID int64 `json:"id"`
// a unique number for each run of a repository
RunNumber int64 `json:"run_number"`
// the jobs name
Jobs []string `json:"jobs"`
}