1
1
mirror of https://github.com/go-gitea/gitea synced 2025-09-28 03:28:13 +00:00

Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418)

This commit is contained in:
Lunny Xiao
2025-09-06 09:52:41 -07:00
committed by GitHub
parent b8f1c9f048
commit c290682521
51 changed files with 1928 additions and 656 deletions

View File

@@ -9,16 +9,26 @@ import (
// ActionTask represents a ActionTask
type ActionTask struct {
ID int64 `json:"id"`
Name string `json:"name"`
HeadBranch string `json:"head_branch"`
HeadSHA string `json:"head_sha"`
RunNumber int64 `json:"run_number"`
Event string `json:"event"`
// ID is the unique identifier for the action task
ID int64 `json:"id"`
// Name is the name of the workflow
Name string `json:"name"`
// HeadBranch is the branch that triggered the workflow
HeadBranch string `json:"head_branch"`
// HeadSHA is the commit SHA that triggered the workflow
HeadSHA string `json:"head_sha"`
// RunNumber is the sequential number of the workflow run
RunNumber int64 `json:"run_number"`
// Event is the type of event that triggered the workflow
Event string `json:"event"`
// DisplayTitle is the display title for the workflow run
DisplayTitle string `json:"display_title"`
Status string `json:"status"`
WorkflowID string `json:"workflow_id"`
URL string `json:"url"`
// Status indicates the current status of the workflow run
Status string `json:"status"`
// WorkflowID is the identifier of the workflow
WorkflowID string `json:"workflow_id"`
// URL is the API URL for this workflow run
URL string `json:"url"`
// swagger:strfmt date-time
CreatedAt time.Time `json:"created_at"`
// swagger:strfmt date-time
@@ -29,8 +39,10 @@ type ActionTask struct {
// ActionTaskResponse returns a ActionTask
type ActionTaskResponse struct {
Entries []*ActionTask `json:"workflow_runs"`
TotalCount int64 `json:"total_count"`
// Entries contains the list of workflow runs
Entries []*ActionTask `json:"workflow_runs"`
// TotalCount is the total number of workflow runs
TotalCount int64 `json:"total_count"`
}
// CreateActionWorkflowDispatch represents the payload for triggering a workflow dispatch event
@@ -45,17 +57,24 @@ type CreateActionWorkflowDispatch struct {
// ActionWorkflow represents a ActionWorkflow
type ActionWorkflow struct {
ID string `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
// ID is the unique identifier for the workflow
ID string `json:"id"`
// Name is the name of the workflow
Name string `json:"name"`
// Path is the file path of the workflow
Path string `json:"path"`
// State indicates if the workflow is active or disabled
State string `json:"state"`
// swagger:strfmt date-time
CreatedAt time.Time `json:"created_at"`
// swagger:strfmt date-time
UpdatedAt time.Time `json:"updated_at"`
URL string `json:"url"`
HTMLURL string `json:"html_url"`
BadgeURL string `json:"badge_url"`
// URL is the API URL for this workflow
URL string `json:"url"`
// HTMLURL is the web URL for viewing the workflow
HTMLURL string `json:"html_url"`
// BadgeURL is the URL for the workflow badge
BadgeURL string `json:"badge_url"`
// swagger:strfmt date-time
DeletedAt time.Time `json:"deleted_at"`
}