@@ -14,39 +14,40 @@ import (
1414
1515// WorkflowRun represents a repository action workflow run.
1616type WorkflowRun struct {
17- ID * int64 `json:"id,omitempty"`
18- Name * string `json:"name,omitempty"`
19- NodeID * string `json:"node_id,omitempty"`
20- HeadBranch * string `json:"head_branch,omitempty"`
21- HeadSHA * string `json:"head_sha,omitempty"`
22- RunNumber * int `json:"run_number,omitempty"`
23- RunAttempt * int `json:"run_attempt,omitempty"`
24- Event * string `json:"event,omitempty"`
25- DisplayTitle * string `json:"display_title,omitempty"`
26- Status * string `json:"status,omitempty"`
27- Conclusion * string `json:"conclusion,omitempty"`
28- WorkflowID * int64 `json:"workflow_id,omitempty"`
29- CheckSuiteID * int64 `json:"check_suite_id,omitempty"`
30- CheckSuiteNodeID * string `json:"check_suite_node_id,omitempty"`
31- URL * string `json:"url,omitempty"`
32- HTMLURL * string `json:"html_url,omitempty"`
33- PullRequests []* PullRequest `json:"pull_requests,omitempty"`
34- CreatedAt * Timestamp `json:"created_at,omitempty"`
35- UpdatedAt * Timestamp `json:"updated_at,omitempty"`
36- RunStartedAt * Timestamp `json:"run_started_at,omitempty"`
37- JobsURL * string `json:"jobs_url,omitempty"`
38- LogsURL * string `json:"logs_url,omitempty"`
39- CheckSuiteURL * string `json:"check_suite_url,omitempty"`
40- ArtifactsURL * string `json:"artifacts_url,omitempty"`
41- CancelURL * string `json:"cancel_url,omitempty"`
42- RerunURL * string `json:"rerun_url,omitempty"`
43- PreviousAttemptURL * string `json:"previous_attempt_url,omitempty"`
44- HeadCommit * HeadCommit `json:"head_commit,omitempty"`
45- WorkflowURL * string `json:"workflow_url,omitempty"`
46- Repository * Repository `json:"repository,omitempty"`
47- HeadRepository * Repository `json:"head_repository,omitempty"`
48- Actor * User `json:"actor,omitempty"`
49- TriggeringActor * User `json:"triggering_actor,omitempty"`
17+ ID * int64 `json:"id,omitempty"`
18+ Name * string `json:"name,omitempty"`
19+ NodeID * string `json:"node_id,omitempty"`
20+ HeadBranch * string `json:"head_branch,omitempty"`
21+ HeadSHA * string `json:"head_sha,omitempty"`
22+ RunNumber * int `json:"run_number,omitempty"`
23+ RunAttempt * int `json:"run_attempt,omitempty"`
24+ Event * string `json:"event,omitempty"`
25+ DisplayTitle * string `json:"display_title,omitempty"`
26+ Status * string `json:"status,omitempty"`
27+ Conclusion * string `json:"conclusion,omitempty"`
28+ WorkflowID * int64 `json:"workflow_id,omitempty"`
29+ CheckSuiteID * int64 `json:"check_suite_id,omitempty"`
30+ CheckSuiteNodeID * string `json:"check_suite_node_id,omitempty"`
31+ URL * string `json:"url,omitempty"`
32+ HTMLURL * string `json:"html_url,omitempty"`
33+ PullRequests []* PullRequest `json:"pull_requests,omitempty"`
34+ CreatedAt * Timestamp `json:"created_at,omitempty"`
35+ UpdatedAt * Timestamp `json:"updated_at,omitempty"`
36+ RunStartedAt * Timestamp `json:"run_started_at,omitempty"`
37+ JobsURL * string `json:"jobs_url,omitempty"`
38+ LogsURL * string `json:"logs_url,omitempty"`
39+ CheckSuiteURL * string `json:"check_suite_url,omitempty"`
40+ ArtifactsURL * string `json:"artifacts_url,omitempty"`
41+ CancelURL * string `json:"cancel_url,omitempty"`
42+ RerunURL * string `json:"rerun_url,omitempty"`
43+ PreviousAttemptURL * string `json:"previous_attempt_url,omitempty"`
44+ HeadCommit * HeadCommit `json:"head_commit,omitempty"`
45+ WorkflowURL * string `json:"workflow_url,omitempty"`
46+ Repository * Repository `json:"repository,omitempty"`
47+ HeadRepository * Repository `json:"head_repository,omitempty"`
48+ Actor * User `json:"actor,omitempty"`
49+ TriggeringActor * User `json:"triggering_actor,omitempty"`
50+ ReferencedWorkflows []* ReferencedWorkflow `json:"referenced_workflows,omitempty"`
5051}
5152
5253// WorkflowRuns represents a slice of repository action workflow run.
@@ -104,6 +105,12 @@ type PendingDeploymentsRequest struct {
104105 Comment string `json:"comment"`
105106}
106107
108+ type ReferencedWorkflow struct {
109+ Path * string `json:"path,omitempty"`
110+ SHA * string `json:"sha,omitempty"`
111+ Ref * string `json:"ref,omitempty"`
112+ }
113+
107114func (s * ActionsService ) listWorkflowRuns (ctx context.Context , endpoint string , opts * ListWorkflowRunsOptions ) (* WorkflowRuns , * Response , error ) {
108115 u , err := addOptions (endpoint , opts )
109116 if err != nil {
0 commit comments