Documentation ¶
Overview ¶
This package was generated from the schema defined at /references/github/v1/exchanges.json The github service publishes a pulse message for supported github events, translating Github webhook events into pulse messages.
This document describes the exchange offered by the taskcluster github service
See:
How to use this package ¶
This package is designed to sit on top of https://pkg.go.dev/github.com/taskcluster/pulse-go/pulse. Please read the pulse package overview to get an understanding of how the pulse client is implemented in go.
This package provides two things in addition to the basic pulse package: structured types for unmarshaling pulse message bodies into, and custom Binding interfaces, for defining the fixed strings for task cluster exchange names, and routing keys as structured types.
For example, when specifying a binding, rather than using:
pulse.Bind( "*.*.*.*.*.*.gaia.#", "exchange/taskcluster-queue/v1/task-defined", )
You can rather use:
queueevents.TaskDefined{WorkerType: "gaia"}
In addition, this means that you will also get objects in your callback method like *queueevents.TaskDefinedMessage rather than just interface{}.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubPullRequestMessage ¶
type GitHubPullRequestMessage struct { // The GitHub `action` which triggered an event. Action string `json:"action"` // The raw body of github event (for version 1) // // Additional properties allowed Body json.RawMessage `json:"body"` // The head ref of the event (for version 1) Branch string `json:"branch"` // Metadata describing the pull request (for version 0) // // Additional properties allowed Details json.RawMessage `json:"details,omitempty"` // The GitHub webhook deliveryId. Extracted from the header 'X-GitHub-Delivery' // // Syntax: ^[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}$ EventID string `json:"eventId"` // The installation which had an event. // // Mininum: 0 // Maximum: 10000000000 InstallationID int64 `json:"installationId"` // The GitHub `organization` which had an event. // // Syntax: ^([a-zA-Z0-9-_%]*)$ // Min length: 1 // Max length: 100 Organization string `json:"organization"` // The GitHub `repository` which had an event. // // Syntax: ^([a-zA-Z0-9-_%]*)$ // Min length: 1 // Max length: 100 Repository string `json:"repository"` // The type of the event (for version 1) Tasks_For string `json:"tasks_for"` // Message version // // Possible values: // * 1 Version float64 `json:"version"` }
Message reporting that a GitHub pull request has occurred
type GitHubPushMessage ¶
type GitHubPushMessage struct { // The raw body of github event (for version 1) // // Additional properties allowed Body json.RawMessage `json:"body"` // The head ref of the event (for version 1) Branch string `json:"branch"` // Metadata describing the push (for version 0) // // Additional properties allowed Details json.RawMessage `json:"details,omitempty"` // The GitHub webhook deliveryId. Extracted from the header 'X-GitHub-Delivery' // // Syntax: ^[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}$ EventID string `json:"eventId"` // The installation which had an event. InstallationID int64 `json:"installationId"` // The GitHub `organization` which had an event. // // Syntax: ^([a-zA-Z0-9-_%]*)$ // Min length: 1 // Max length: 100 Organization string `json:"organization"` // The GitHub `repository` which had an event. // // Syntax: ^([a-zA-Z0-9-_%]*)$ // Min length: 1 // Max length: 100 Repository string `json:"repository"` // The type of the event (for version 1) Tasks_For string `json:"tasks_for"` // Message version // // Possible values: // * 1 Version float64 `json:"version"` }
Message reporting that a GitHub push has occurred
type GitHubReRunRequestMessage ¶ added in v44.16.0
type GitHubReRunRequestMessage struct { // The raw body of github event (for version 1) // // Additional properties allowed Body json.RawMessage `json:"body"` // Check run id CheckRunID float64 `json:"checkRunId"` // Check suite id CheckSuiteID float64 `json:"checkSuiteId"` // Metadata describing the push (for version 0) // // Additional properties allowed Details json.RawMessage `json:"details,omitempty"` // The GitHub webhook deliveryId. Extracted from the header 'X-GitHub-Delivery' // // Syntax: ^[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}$ EventID string `json:"eventId"` // The installation which had an event. InstallationID int64 `json:"installationId"` // The GitHub `organization` which had an event. // // Syntax: ^([a-zA-Z0-9-_%]*)$ // Min length: 1 // Max length: 100 Organization string `json:"organization"` // The GitHub `repository` which had an event. // // Syntax: ^([a-zA-Z0-9-_%]*)$ // Min length: 1 // Max length: 100 Repository string `json:"repository"` // The type of the event (for version 1) Tasks_For string `json:"tasks_for"` // Message version // // Possible values: // * 1 Version float64 `json:"version"` }
Message reporting that a GitHub re-run task request has occurred
type GitHubReleaseMessage ¶
type GitHubReleaseMessage struct { // The raw body of github event (for version 1) // // Additional properties allowed Body json.RawMessage `json:"body"` // The head ref of the event (for version 1) Branch string `json:"branch"` // Metadata describing the release (for version 0) // // Additional properties allowed Details json.RawMessage `json:"details,omitempty"` // The GitHub webhook deliveryId. Extracted from the header 'X-GitHub-Delivery' // // Syntax: ^[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}$ EventID string `json:"eventId"` // The installation which had an event. // // Mininum: 0 // Maximum: 10000000000 InstallationID int64 `json:"installationId"` // The GitHub `organization` which had an event. // // Syntax: ^([a-zA-Z0-9-_%]*)$ // Min length: 1 // Max length: 100 Organization string `json:"organization"` // The GitHub `repository` which had an event. // // Syntax: ^([a-zA-Z0-9-_%]*)$ // Min length: 1 // Max length: 100 Repository string `json:"repository"` // The type of the event (for version 1) Tasks_For string `json:"tasks_for"` // Message version // // Possible values: // * 1 Version float64 `json:"version"` }
Message reporting that a GitHub release has occurred
type PullRequest ¶
type PullRequest struct { RoutingKeyKind string `mwords:"*"` Organization string `mwords:"*"` Repository string `mwords:"*"` Action string `mwords:"*"` }
When a GitHub pull request event is posted it will be broadcast on this exchange with the designated `organization` and `repository` in the routing-key along with event specific metadata in the payload.
See #pullRequest
func (PullRequest) ExchangeName ¶
func (binding PullRequest) ExchangeName() string
func (PullRequest) NewPayloadObject ¶
func (binding PullRequest) NewPayloadObject() interface{}
func (PullRequest) RoutingKey ¶
func (binding PullRequest) RoutingKey() string
type Push ¶
type Push struct { RoutingKeyKind string `mwords:"*"` Organization string `mwords:"*"` Repository string `mwords:"*"` }
When a GitHub push event is posted it will be broadcast on this exchange with the designated `organization` and `repository` in the routing-key along with event specific metadata in the payload.
See #push
func (Push) ExchangeName ¶
func (Push) NewPayloadObject ¶
func (binding Push) NewPayloadObject() interface{}
func (Push) RoutingKey ¶
type Release ¶
type Release struct { RoutingKeyKind string `mwords:"*"` Organization string `mwords:"*"` Repository string `mwords:"*"` }
When a GitHub release event is posted it will be broadcast on this exchange with the designated `organization` and `repository` in the routing-key along with event specific metadata in the payload.
See #release
func (Release) ExchangeName ¶
func (Release) NewPayloadObject ¶
func (binding Release) NewPayloadObject() interface{}
func (Release) RoutingKey ¶
type Rerun ¶ added in v44.16.0
type Rerun struct { RoutingKeyKind string `mwords:"*"` Organization string `mwords:"*"` Repository string `mwords:"*"` }
When a GitHub check_run event with action="rerequested" is posted it will be broadcast on this exchange with the designated `organization` and `repository` in the routing-key along with event specific metadata in the payload.
See #rerun
func (Rerun) ExchangeName ¶ added in v44.16.0
func (Rerun) NewPayloadObject ¶ added in v44.16.0
func (binding Rerun) NewPayloadObject() interface{}
func (Rerun) RoutingKey ¶ added in v44.16.0
type TaskGroupCreationRequested ¶
type TaskGroupCreationRequested struct { RoutingKeyKind string `mwords:"*"` Organization string `mwords:"*"` Repository string `mwords:"*"` }
supposed to signal that taskCreate API has been called for every task in the task group for this particular repo and this particular organization currently used for creating initial status indicators in GitHub UI using Statuses API. This particular exchange can also be bound to RabbitMQ queues by custom routes - for that, Pass in the array of routes as a second argument to the publish method. Currently, we do use the statuses routes to bind the handler that creates the initial status.
See #taskGroupCreationRequested
func (TaskGroupCreationRequested) ExchangeName ¶
func (binding TaskGroupCreationRequested) ExchangeName() string
func (TaskGroupCreationRequested) NewPayloadObject ¶
func (binding TaskGroupCreationRequested) NewPayloadObject() interface{}
func (TaskGroupCreationRequested) RoutingKey ¶
func (binding TaskGroupCreationRequested) RoutingKey() string
type TaskGroupDefinedCreateStatus ¶
type TaskGroupDefinedCreateStatus struct { // The GitHub `organization` which had an event. // // Syntax: ^([a-zA-Z0-9-_%]*)$ // Min length: 1 // Max length: 100 Organization string `json:"organization"` // The GitHub `repository` which had an event. // // Syntax: ^([a-zA-Z0-9-_%]*)$ // Min length: 1 // Max length: 100 Repository string `json:"repository"` // The id of the taskGroup that had been created. TaskGroupID string `json:"taskGroupId"` // Message version // // Possible values: // * 1 Version float64 `json:"version"` }
Indicates that this service has created a new task group in response to a GitHub event. This message is for internal use only and should not be relied on for other purposes. Full specification on [GitHub docs](https://developer.github.com/v3/repos/statuses/#create-a-status)