Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for workflow_job event's labels field #2103

Merged
merged 2 commits into from Sep 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions github/actions_workflow_jobs.go
Expand Up @@ -38,6 +38,8 @@ type WorkflowJob struct {
Name *string `json:"name,omitempty"`
Steps []*TaskStep `json:"steps,omitempty"`
CheckRunURL *string `json:"check_run_url,omitempty"`
// Labels represents runner labels from the `runs-on:` key from a GitHub Actions workflow.
Labels []string `json:"labels,omitempty"`
}

// Jobs represents a slice of repository action workflow job.
Expand Down
5 changes: 4 additions & 1 deletion github/event_types.go
Expand Up @@ -1116,13 +1116,16 @@ type WorkflowDispatchEvent struct {

// WorkflowJobEvent is triggered when a job is queued, started or completed.
//
// GitHub API docs: pending
// GitHub API docs: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_job
type WorkflowJobEvent struct {
WorkflowJob *WorkflowJob `json:"workflow_job,omitempty"`

Action *string `json:"action,omitempty"`

// The following fields are only populated by Webhook events.

// Org is not nil when the webhook is configured for an organization or the event
// occurs from activity in a repository owned by an organization.
Org *Organization `json:"organization,omitempty"`
Repo *Repository `json:"repository,omitempty"`
Sender *User `json:"sender,omitempty"`
Expand Down