From b0f536019ae10a60d8eebed55d403abb381a501d Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Sat, 3 May 2025 18:39:33 +0200 Subject: [PATCH] update swagger for head_sha --- routers/api/v1/admin/runners.go | 5 +++++ routers/api/v1/org/action.go | 5 +++++ routers/api/v1/repo/action.go | 5 +++++ routers/api/v1/user/runners.go | 5 +++++ templates/swagger/v1_json.tmpl | 30 ++++++++++++++++++++++++++++++ 5 files changed, 50 insertions(+) diff --git a/routers/api/v1/admin/runners.go b/routers/api/v1/admin/runners.go index 865b791283..1abb314afc 100644 --- a/routers/api/v1/admin/runners.go +++ b/routers/api/v1/admin/runners.go @@ -163,6 +163,11 @@ func ListWorkflowRuns(ctx *context.APIContext) { // description: triggered by user // type: string // required: false + // - name: head_sha + // in: query + // description: triggering sha of the workflow run + // type: string + // required: false // - name: page // in: query // description: page number of results to return (1-based) diff --git a/routers/api/v1/org/action.go b/routers/api/v1/org/action.go index 2c4b66f017..5345d32cb3 100644 --- a/routers/api/v1/org/action.go +++ b/routers/api/v1/org/action.go @@ -637,6 +637,11 @@ func (Action) ListWorkflowRuns(ctx *context.APIContext) { // description: triggered by user // type: string // required: false + // - name: head_sha + // in: query + // description: triggering sha of the workflow run + // type: string + // required: false // - name: page // in: query // description: page number of results to return (1-based) diff --git a/routers/api/v1/repo/action.go b/routers/api/v1/repo/action.go index e1468cb67a..dd4d467ba9 100644 --- a/routers/api/v1/repo/action.go +++ b/routers/api/v1/repo/action.go @@ -732,6 +732,11 @@ func (Action) ListWorkflowRuns(ctx *context.APIContext) { // description: triggered by user // type: string // required: false + // - name: head_sha + // in: query + // description: triggering sha of the workflow run + // type: string + // required: false // - name: page // in: query // description: page number of results to return (1-based) diff --git a/routers/api/v1/user/runners.go b/routers/api/v1/user/runners.go index 3fc8973585..37c606478e 100644 --- a/routers/api/v1/user/runners.go +++ b/routers/api/v1/user/runners.go @@ -129,6 +129,11 @@ func ListWorkflowRuns(ctx *context.APIContext) { // description: triggered by user // type: string // required: false + // - name: head_sha + // in: query + // description: triggering sha of the workflow run + // type: string + // required: false // - name: page // in: query // description: page number of results to return (1-based) diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 2e163c5468..d7de1f3b52 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -255,6 +255,12 @@ "name": "actor", "in": "query" }, + { + "type": "string", + "description": "triggering sha of the workflow run", + "name": "head_sha", + "in": "query" + }, { "type": "integer", "description": "page number of results to return (1-based)", @@ -2153,6 +2159,12 @@ "name": "actor", "in": "query" }, + { + "type": "string", + "description": "triggering sha of the workflow run", + "name": "head_sha", + "in": "query" + }, { "type": "integer", "description": "page number of results to return (1-based)", @@ -5132,6 +5144,12 @@ "name": "actor", "in": "query" }, + { + "type": "string", + "description": "triggering sha of the workflow run", + "name": "head_sha", + "in": "query" + }, { "type": "integer", "description": "page number of results to return (1-based)", @@ -18172,6 +18190,12 @@ "name": "actor", "in": "query" }, + { + "type": "string", + "description": "triggering sha of the workflow run", + "name": "head_sha", + "in": "query" + }, { "type": "integer", "description": "page number of results to return (1-based)", @@ -21055,6 +21079,9 @@ "description": "ActionWorkflowRun represents a WorkflowRun", "type": "object", "properties": { + "actor": { + "$ref": "#/definitions/User" + }, "completed_at": { "type": "string", "format": "date-time", @@ -21123,6 +21150,9 @@ "type": "string", "x-go-name": "Status" }, + "trigger_actor": { + "$ref": "#/definitions/User" + }, "url": { "type": "string", "x-go-name": "URL"