mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-07-04 16:00:01 +02:00

Two pull requests were merged at the same time - https://codeberg.org/forgejo/forgejo/pulls/7699 - https://codeberg.org/forgejo/forgejo/pulls/7508 And added conflicting structs ActionRun modules/structs. That broke the forgejo development branch and a quick fix was made to resolve the name conflict. - https://codeberg.org/forgejo/forgejo/pulls/8066 However that creates an undesirable duplication of two structures that serve the same purpose but are different. - Remove RepoActionRun and replace it with ActionRun - convert.ToActionRun has one more argument, the doer, because it is determined differently in the context of webhooks or API ### Tests - No need because the two pull requests involved already have good coverage. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8250 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Reviewed-by: klausfyhn <klausfyhn@noreply.codeberg.org> Reviewed-by: Christopher Besch <mail@chris-besch.com> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
34 lines
968 B
Go
34 lines
968 B
Go
// Copyright 2023 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package structs
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// 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"`
|
|
DisplayTitle string `json:"display_title"`
|
|
Status string `json:"status"`
|
|
WorkflowID string `json:"workflow_id"`
|
|
URL string `json:"url"`
|
|
// swagger:strfmt date-time
|
|
CreatedAt time.Time `json:"created_at"`
|
|
// swagger:strfmt date-time
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
// swagger:strfmt date-time
|
|
RunStartedAt time.Time `json:"run_started_at"`
|
|
}
|
|
|
|
// ActionTaskResponse returns a ActionTask
|
|
type ActionTaskResponse struct {
|
|
Entries []*ActionTask `json:"workflow_runs"`
|
|
TotalCount int64 `json:"total_count"`
|
|
}
|