feat(api): Add GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs (#37196)
- Add GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs
endpoint, matching the
https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2026-03-10#list-workflow-runs-for-a-workflow
---------
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
175
templates/swagger/v1_json.tmpl
generated
175
templates/swagger/v1_json.tmpl
generated
@@ -5335,6 +5335,12 @@
|
||||
"name": "head_sha",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "if true, the `pull_requests` field on each returned run is emptied",
|
||||
"name": "exclude_pull_requests",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "page number of results to return (1-based)",
|
||||
@@ -6622,6 +6628,103 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"repository"
|
||||
],
|
||||
"summary": "List runs for a workflow",
|
||||
"operationId": "ActionsListWorkflowRuns",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the repo",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "id of the workflow, must be the workflow file name (e.g. `build.yml`)",
|
||||
"name": "workflow_id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "workflow event name",
|
||||
"name": "event",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "workflow branch",
|
||||
"name": "branch",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "workflow status (pending, queued, in_progress, failure, success, skipped)",
|
||||
"name": "status",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "triggered by user",
|
||||
"name": "actor",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "triggering sha of the workflow run",
|
||||
"name": "head_sha",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "if true, the `pull_requests` field on each returned run is emptied",
|
||||
"name": "exclude_pull_requests",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "page number of results to return (1-based)",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "page size of results",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/WorkflowRunsList"
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/responses/error"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/activities/feeds": {
|
||||
"get": {
|
||||
"produces": [
|
||||
@@ -22395,6 +22498,13 @@
|
||||
"type": "string",
|
||||
"x-go-name": "PreviousAttemptURL"
|
||||
},
|
||||
"pull_requests": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/PullRequestMinimal"
|
||||
},
|
||||
"x-go-name": "PullRequests"
|
||||
},
|
||||
"repository": {
|
||||
"$ref": "#/definitions/Repository"
|
||||
},
|
||||
@@ -28737,6 +28847,71 @@
|
||||
},
|
||||
"x-go-package": "gitea.dev/modules/structs"
|
||||
},
|
||||
"PullRequestMinimal": {
|
||||
"description": "PullRequestMinimal is the minimal information about a pull request, as\nreturned in the `pull_requests` field of a workflow run.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"base": {
|
||||
"$ref": "#/definitions/PullRequestMinimalHead"
|
||||
},
|
||||
"head": {
|
||||
"$ref": "#/definitions/PullRequestMinimalHead"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"x-go-name": "ID"
|
||||
},
|
||||
"number": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"x-go-name": "Number"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"x-go-name": "URL"
|
||||
}
|
||||
},
|
||||
"x-go-package": "gitea.dev/modules/structs"
|
||||
},
|
||||
"PullRequestMinimalHead": {
|
||||
"type": "object",
|
||||
"title": "PullRequestMinimalHead is a minimal description of one side of a pull request.",
|
||||
"properties": {
|
||||
"ref": {
|
||||
"type": "string",
|
||||
"x-go-name": "Ref"
|
||||
},
|
||||
"repo": {
|
||||
"$ref": "#/definitions/PullRequestMinimalHeadRepo"
|
||||
},
|
||||
"sha": {
|
||||
"type": "string",
|
||||
"x-go-name": "SHA"
|
||||
}
|
||||
},
|
||||
"x-go-package": "gitea.dev/modules/structs"
|
||||
},
|
||||
"PullRequestMinimalHeadRepo": {
|
||||
"type": "object",
|
||||
"title": "PullRequestMinimalHeadRepo is a minimal description of the repository on one side of a pull request.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"x-go-name": "ID"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"x-go-name": "Name"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"x-go-name": "URL"
|
||||
}
|
||||
},
|
||||
"x-go-package": "gitea.dev/modules/structs"
|
||||
},
|
||||
"PullReview": {
|
||||
"description": "PullReview represents a pull request review",
|
||||
"type": "object",
|
||||
|
||||
198
templates/swagger/v1_openapi3_json.tmpl
generated
198
templates/swagger/v1_openapi3_json.tmpl
generated
@@ -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"
|
||||
},
|
||||
@@ -8690,6 +8697,73 @@
|
||||
"type": "object",
|
||||
"x-go-package": "gitea.dev/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": "gitea.dev/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": "gitea.dev/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": "gitea.dev/modules/structs"
|
||||
},
|
||||
"PullReview": {
|
||||
"description": "PullReview represents a pull request review",
|
||||
"properties": {
|
||||
@@ -16269,6 +16343,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",
|
||||
@@ -17672,6 +17754,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",
|
||||
|
||||
Reference in New Issue
Block a user