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
type ActionTask struct {
Id int64 `json:"id"`
ID int64 `json:"id"`
Name string `json:"name"`
HeadBranch string `json:"head_branch"`
HeadSha string `json:"head_sha"`
@ -18,7 +18,7 @@ type ActionTask struct {
DisplayTitle string `json:"display_title"`
Status string `json:"status"`
WorkflowID string `json:"workflow_id"`
Url string `json:"url"`
URL string `json:"url"`
// swagger:strfmt date-time
CreatedAt time.Time `json:"created_at,omitempty"`
// 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{
Id: t.ID,
ID: t.ID,
Name: t.Job.Name,
HeadBranch: t.Job.Run.PrettyRef(),
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,
Status: t.Status.String(),
WorkflowID: t.Job.Run.WorkflowID,
Url: t.GetRunLink(),
URL: t.GetRunLink(),
CreatedAt: t.Created.AsLocalTime(),
UpdatedAt: t.Updated.AsLocalTime(),
RunStartedAt: t.Started.AsLocalTime(),