Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartWatching ¶
func StartWatching()
StartWatching is a helper function that will call all events allowing then to subscribe then to their related event
func StartWatchingGithubReleases ¶
func StartWatchingGithubReleases()
StartWatchingGithubReleases subscribes to the GitHub release event channel
func WebhookListener ¶
func WebhookListener(rw http.ResponseWriter, req *http.Request, ps httprouter.Params)
WebhookListener is the endpoint for which the GitHub webhook events should be sent It checks if we support the sent event and handles it accordingly
Types ¶
type Owner ¶
type Owner struct {
AvatarURL string `json:"avatar_url"`
}
Owner is the data related to the GitHub repository owner, can be a user or and organisation
type Release ¶
type Release struct { ID int `json:"id"` URL string `json:"url"` HTMLURL string `json:"html_url"` AssetsURL string `json:"assets_url"` UploadURL string `json:"upload_url"` TarballURL string `json:"tarball_url"` ZipballURL string `json:"zipball_url"` NodeID string `json:"node_id"` TagName string `json:"tag_name"` Branch string `json:"target_commitish"` Name string `json:"name"` Body string `json:"body"` Draft bool `json:"draft"` Prerelease bool `json:"prerelease"` CreatedAt time.Time `json:"created_at"` PublishedAt time.Time `json:"published_at"` }
Release is the data sent when the event of the payload is a repository release
type Repository ¶
type Repository struct { Name string `json:"name"` FullName string `json:"full_name"` Owner Owner `json:"owner"` HTMLURL string `json:"html_url"` Description string `json:"description"` }
Repository is the data related to a GitHub repository
Click to show internal directories.
Click to hide internal directories.