From 86e81a721679e08a4cf9a3c9d6ee37885336d953 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Fri, 8 May 2026 22:55:34 +0200 Subject: [PATCH] fix docs --- templates/swagger/v1_json.tmpl | 12 +- templates/swagger/v1_openapi3_json.tmpl | 198 ++++++++++++++++++++++++ 2 files changed, 204 insertions(+), 6 deletions(-) diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index dba77fbf64..a0975fb502 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -22201,6 +22201,11 @@ "type": "string", "x-go-name": "Path" }, + "previous_attempt_url": { + "description": "PreviousAttemptURL is the API URL of the previous attempt of this run, e.g. \".../actions/runs/{run_id}/attempts/{attempt-1}\".\nIt is set only when the current attempt is \u003e 1 (i.e. a rerun). For the first attempt, or for legacy runs that pre-date ActionRunAttempt, it is null.", + "type": "string", + "x-go-name": "PreviousAttemptURL" + }, "pull_requests": { "type": "array", "items": { @@ -22208,11 +22213,6 @@ }, "x-go-name": "PullRequests" }, - "previous_attempt_url": { - "description": "PreviousAttemptURL is the API URL of the previous attempt of this run, e.g. \".../actions/runs/{run_id}/attempts/{attempt-1}\".\nIt is set only when the current attempt is \u003e 1 (i.e. a rerun). For the first attempt, or for legacy runs that pre-date ActionRunAttempt, it is null.", - "type": "string", - "x-go-name": "PreviousAttemptURL" - }, "repository": { "$ref": "#/definitions/Repository" }, @@ -31645,4 +31645,4 @@ "TOTPHeader": [] } ] -} +} \ No newline at end of file diff --git a/templates/swagger/v1_openapi3_json.tmpl b/templates/swagger/v1_openapi3_json.tmpl index 33adff75e0..271edcf79a 100644 --- a/templates/swagger/v1_openapi3_json.tmpl +++ b/templates/swagger/v1_openapi3_json.tmpl @@ -2344,6 +2344,13 @@ "type": "string", "x-go-name": "PreviousAttemptURL" }, + "pull_requests": { + "items": { + "$ref": "#/components/schemas/PullRequestMinimal" + }, + "type": "array", + "x-go-name": "PullRequests" + }, "repository": { "$ref": "#/components/schemas/Repository" }, @@ -8612,6 +8619,73 @@ "type": "object", "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "PullRequestMinimal": { + "description": "PullRequestMinimal is the minimal information about a pull request, as\nreturned in the `pull_requests` field of a workflow run.", + "properties": { + "base": { + "$ref": "#/components/schemas/PullRequestMinimalHead" + }, + "head": { + "$ref": "#/components/schemas/PullRequestMinimalHead" + }, + "id": { + "format": "int64", + "type": "integer", + "x-go-name": "ID" + }, + "number": { + "format": "int64", + "type": "integer", + "x-go-name": "Number" + }, + "url": { + "format": "uri", + "type": "string", + "x-go-name": "URL" + } + }, + "type": "object", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PullRequestMinimalHead": { + "properties": { + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "repo": { + "$ref": "#/components/schemas/PullRequestMinimalHeadRepo" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + } + }, + "title": "PullRequestMinimalHead is a minimal description of one side of a pull request.", + "type": "object", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "PullRequestMinimalHeadRepo": { + "properties": { + "id": { + "format": "int64", + "type": "integer", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "url": { + "format": "uri", + "type": "string", + "x-go-name": "URL" + } + }, + "title": "PullRequestMinimalHeadRepo is a minimal description of the repository on one side of a pull request.", + "type": "object", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "PullReview": { "description": "PullReview represents a pull request review", "properties": { @@ -16140,6 +16214,14 @@ "type": "string" } }, + { + "description": "if true, the `pull_requests` field on each returned run is emptied", + "in": "query", + "name": "exclude_pull_requests", + "schema": { + "type": "boolean" + } + }, { "description": "page number of results to return (1-based)", "in": "query", @@ -17524,6 +17606,122 @@ ] } }, + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + "get": { + "operationId": "ActionsListWorkflowRuns", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the workflow, must be the workflow file name (e.g. `build.yml`)", + "in": "path", + "name": "workflow_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "workflow event name", + "in": "query", + "name": "event", + "schema": { + "type": "string" + } + }, + { + "description": "workflow branch", + "in": "query", + "name": "branch", + "schema": { + "type": "string" + } + }, + { + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "in": "query", + "name": "status", + "schema": { + "type": "string" + } + }, + { + "description": "triggered by user", + "in": "query", + "name": "actor", + "schema": { + "type": "string" + } + }, + { + "description": "triggering sha of the workflow run", + "in": "query", + "name": "head_sha", + "schema": { + "type": "string" + } + }, + { + "description": "if true, the `pull_requests` field on each returned run is emptied", + "in": "query", + "name": "exclude_pull_requests", + "schema": { + "type": "boolean" + } + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "schema": { + "type": "integer" + } + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/WorkflowRunsList" + }, + "400": { + "$ref": "#/components/responses/error" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "List runs for a workflow", + "tags": [ + "repository" + ] + } + }, "/repos/{owner}/{repo}/activities/feeds": { "get": { "operationId": "repoListActivityFeeds",