1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-06 02:04:26 +00:00

Fix var-naming

This commit is contained in:
chesterip 2023-08-30 11:34:01 -04:00
parent 80a2c8ee38
commit 1ba5701536
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ import (
// ActionTask represents a ActionTask // ActionTask represents a ActionTask
type ActionTask struct { type ActionTask struct {
Id int64 `json:"id"` ID int64 `json:"id"`
Name string `json:"name"` Name string `json:"name"`
HeadBranch string `json:"head_branch"` HeadBranch string `json:"head_branch"`
HeadSha string `json:"head_sha"` HeadSha string `json:"head_sha"`
@ -18,7 +18,7 @@ type ActionTask struct {
DisplayTitle string `json:"display_title"` DisplayTitle string `json:"display_title"`
Status string `json:"status"` Status string `json:"status"`
WorkflowID string `json:"workflow_id"` WorkflowID string `json:"workflow_id"`
Url string `json:"url"` URL string `json:"url"`
// swagger:strfmt date-time // swagger:strfmt date-time
CreatedAt time.Time `json:"created_at,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"`
// swagger:strfmt date-time // swagger:strfmt date-time

View File

@ -187,7 +187,7 @@ func ToActionTask(ctx context.Context, repo *repo_model.Repository, t *actions_m
} }
return &api.ActionTask{ return &api.ActionTask{
Id: t.ID, ID: t.ID,
Name: t.Job.Name, Name: t.Job.Name,
HeadBranch: t.Job.Run.PrettyRef(), HeadBranch: t.Job.Run.PrettyRef(),
HeadSha: t.Job.CommitSHA, HeadSha: t.Job.CommitSHA,
@ -196,7 +196,7 @@ func ToActionTask(ctx context.Context, repo *repo_model.Repository, t *actions_m
DisplayTitle: t.Job.Run.Title, DisplayTitle: t.Job.Run.Title,
Status: t.Status.String(), Status: t.Status.String(),
WorkflowID: t.Job.Run.WorkflowID, WorkflowID: t.Job.Run.WorkflowID,
Url: t.GetRunLink(), URL: t.GetRunLink(),
CreatedAt: t.Created.AsLocalTime(), CreatedAt: t.Created.AsLocalTime(),
UpdatedAt: t.Updated.AsLocalTime(), UpdatedAt: t.Updated.AsLocalTime(),
RunStartedAt: t.Started.AsLocalTime(), RunStartedAt: t.Started.AsLocalTime(),