mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-02 00:45:06 +02:00
wip event
This commit is contained in:
@@ -470,6 +470,22 @@ func (p *CommitStatusPayload) JSONPayload() ([]byte, error) {
|
||||
return json.MarshalIndent(p, "", " ")
|
||||
}
|
||||
|
||||
// WorkflowRunPayload represents a payload information of workflow run event.
|
||||
type WorkflowRunPayload struct {
|
||||
Action string `json:"action"`
|
||||
Workflow *ActionWorkflow `json:"workflow"`
|
||||
WorkflowRun *ActionWorkflowRun `json:"workflow_run"`
|
||||
PullRequest *PullRequest `json:"pull_request,omitempty"`
|
||||
Organization *Organization `json:"organization,omitempty"`
|
||||
Repo *Repository `json:"repository"`
|
||||
Sender *User `json:"sender"`
|
||||
}
|
||||
|
||||
// JSONPayload implements Payload
|
||||
func (p *WorkflowRunPayload) JSONPayload() ([]byte, error) {
|
||||
return json.MarshalIndent(p, "", " ")
|
||||
}
|
||||
|
||||
// WorkflowJobPayload represents a payload information of workflow job event.
|
||||
type WorkflowJobPayload struct {
|
||||
Action string `json:"action"`
|
||||
|
||||
@@ -87,8 +87,20 @@ type ActionArtifact struct {
|
||||
// ActionWorkflowRun represents a WorkflowRun
|
||||
type ActionWorkflowRun struct {
|
||||
ID int64 `json:"id"`
|
||||
URL string `json:"url"`
|
||||
HTMLURL string `json:"html_url"`
|
||||
Event string `json:"event"`
|
||||
RunAttempt int64 `json:"run_attempt"`
|
||||
RunNumber int64 `json:"run_number"`
|
||||
RepositoryID int64 `json:"repository_id"`
|
||||
HeadSha string `json:"head_sha"`
|
||||
HeadBranch string `json:"head_branch,omitempty"`
|
||||
Status string `json:"status"`
|
||||
Conclusion string `json:"conclusion,omitempty"`
|
||||
// swagger:strfmt date-time
|
||||
StartedAt time.Time `json:"started_at,omitempty"`
|
||||
// swagger:strfmt date-time
|
||||
CompletedAt time.Time `json:"completed_at,omitempty"`
|
||||
}
|
||||
|
||||
// ActionArtifactsResponse returns ActionArtifacts
|
||||
|
||||
@@ -38,6 +38,7 @@ const (
|
||||
HookEventPullRequestReview HookEventType = "pull_request_review"
|
||||
// Actions event only
|
||||
HookEventSchedule HookEventType = "schedule"
|
||||
HookEventWorkflowRun HookEventType = "workflow_run"
|
||||
HookEventWorkflowJob HookEventType = "workflow_job"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user