1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-25 18:14:28 +00:00

Fix template

This commit is contained in:
chesterip 2023-08-22 20:00:59 -04:00
parent b8a61a6ba4
commit 8b5443acdb
2 changed files with 46 additions and 100 deletions

View File

@ -186,7 +186,7 @@ func ToActionTask(ctx context.Context, repo *repo_model.Repository, t *actions_m
log.Warn("LoadAttributes of ActionTask: %v", err) log.Warn("LoadAttributes of ActionTask: %v", err)
} }
return &api.ActionTask{ return &api.ActionTask{
ID: t.ID, ID: t.Job.RunID,
JobName: t.Job.Name, JobName: t.Job.Name,
WorkflowID: t.Job.Run.WorkflowID, WorkflowID: t.Job.Run.WorkflowID,
Title: t.Job.Run.Title, Title: t.Job.Run.Title,

View File

@ -3184,6 +3184,51 @@
} }
} }
}, },
"/repos/{owner}/{repo}/actions/tasks": {
"get": {
"produces": [
"application/json"
],
"tags": [
"repository"
],
"summary": "List a repository's action tasks",
"operationId": "ListActionTasks",
"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": "integer",
"description": "page number of results to return (1-based)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "page size of results, default maximum page size is 50",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/TasksList"
}
}
}
},
"/repos/{owner}/{repo}/activities/feeds": { "/repos/{owner}/{repo}/activities/feeds": {
"get": { "get": {
"produces": [ "produces": [
@ -12313,51 +12358,6 @@
} }
} }
}, },
"/repos/{owner}/{repo}/actions/tasks": {
"get": {
"produces": [
"application/json"
],
"tags": [
"repository"
],
"summary": "List a repository's actions tasks",
"operationId": "ListActionTasks",
"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": "integer",
"description": "page number of results to return (1-based)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "page size of results, default maximum page size is 50",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/TasksList"
}
}
}
},
"/repos/{owner}/{repo}/teams": { "/repos/{owner}/{repo}/teams": {
"get": { "get": {
"produces": [ "produces": [
@ -21459,51 +21459,6 @@
}, },
"x-go-package": "code.gitea.io/gitea/modules/structs" "x-go-package": "code.gitea.io/gitea/modules/structs"
}, },
"Task": {
"description": "Task represents a task",
"type": "object",
"properties": {
"id": {
"type": "string",
"x-go-name": "ID"
},
"job_name": {
"type": "string",
"x-go-name": "JobName"
},
"workflow_id": {
"type": "string",
"x-go-name": "WorkflowID"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"status": {
"type": "string",
"x-go-name": "Status"
},
"commit": {
"type": "string",
"x-go-name": "Commit"
},
"duration": {
"type": "string",
"x-go-name": "Duration"
},
"started": {
"type": "string",
"format": "date-time",
"x-go-name": "Started"
},
"stopped": {
"type": "string",
"format": "date-time",
"x-go-name": "Stopped"
}
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
"ServerVersion": { "ServerVersion": {
"description": "ServerVersion wraps the version of the server", "description": "ServerVersion wraps the version of the server",
"type": "object", "type": "object",
@ -23090,15 +23045,6 @@
} }
} }
}, },
"TasksList": {
"description": "TasksList",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Task"
}
}
},
"ServerVersion": { "ServerVersion": {
"description": "ServerVersion", "description": "ServerVersion",
"schema": { "schema": {