Documentation
¶
Index ¶
Constants ¶
View Source
const ( ServiceSlug = "gitlab" DomainName = "gitlab.com" EventSlugs = "comment-on-commit,comment-onissue,comment-on-merge-request,issue,merge-request,push,release,tag-push" )
Variables ¶
This section is empty.
Functions ¶
func NewEvents ¶
func NewEvents() gowebhooks.Events
func ReadExampleFile ¶
ReadExampleFile reads an embedded example file.
Types ¶
type Commit ¶
type Commit struct { Id string `json:"id"` Message string `json:"message,omitempty"` Title string `json:"title,omitempty"` Timestamp time.Time `json:"timestamp,omitempty"` Url string `json:"url,omitempty"` Author Author `json:"author,omitempty"` Added []string `json:"added"` Modified []string `json:"modified"` Removed []string `json:"removed"` }
Commit is used by `push` event
type EventMergeRequest ¶
type EventMergeRequest struct { ObjectKind string `json:"object_kind,omitempty"` EventName string `json:"event_name,omitempty"` User User `json:"user,omitempty"` Project Project `json:"project,omitempty"` Repository Repository `json:"repository,omitempty"` }
type EventPush ¶
type EventPush struct { ObjectKind string `json:"object_kind,omitempty"` EventName string `json:"event_name,omitempty"` Before string `json:"before,omitempty"` After string `json:"after,omitempty"` Ref string `json:"ref,omitempty"` CheckoutSha string `json:"checkout_sha,omitempty"` UserId string `json:"user_id"` UserName string `json:"user_name,omitempty"` UserUsername string `json:"user_username,omitempty"` UserEmail string `json:"user_email,omitempty"` UserAvatar string `json:"user_avatar,omitempty"` ProjectId string `json:"project_id"` Project Project `json:"project,omitempty"` Repository Repository `json:"repository,omitempty"` Commits []Commit `json:"commits,omitempty"` TotalCommitsCount int `json:"total_commits_count"` // include `0` }
EventPush is defined at https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#push-events
type Project ¶
type Project struct { Id int `json:"id"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` WebUrl string `json:"web_url,omitempty"` AvatarUrl string `json:"avatar_url,omitempty"` GitSshUrl string `json:"git_ssh_url,omitempty"` GitHttpUrl string `json:"git_http_url,omitempty"` Namespace string `json:"namespace,omitempty"` VisibilityLevel int `json:"visibility_level"` // include `0` PathWithNamespace string `json:"path_with_namespace,omitempty"` DefaultBranch string `json:"default_branch,omitempty"` Homepage string `json:"homepage,omitempty"` Url string `json:"url,omitempty"` SshUrl string `json:"ssh_url,omitempty"` HttpUrl string `json:"http_url,omitempty"` }
Project is used by `push` event
type Repository ¶
type Repository struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` Description string `json:"description,omitempty"` Homepage string `json:"homepage,omitempty"` GitHttpUrl string `json:"git_http_url,omitempty"` GitSshUrl string `json:"git_ssh_url,omitempty"` VisibilityLevel int `json:"visibility_level"` // include `0` }
Repository is used by `push` event
Click to show internal directories.
Click to hide internal directories.