add run_number to optional workflow dispatch data

This commit is contained in:
Klaus Fyhn 2025-03-21 13:44:10 +01:00
parent bec2659bfb
commit 7b3ff7c7e7
2 changed files with 5 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"`
}

View file

@ -681,8 +681,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 {