Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct { Properties struct { RepositoryID int `json:"repositoryId"` } `json:"properties"` ID int `json:"id"` Version int `json:"version"` Text string `json:"text"` Author User `json:"author"` CreatedDate int64 `json:"createdDate"` UpdatedDate int64 `json:"updatedDate"` Comments []interface{} `json:"comments"` Tasks []interface{} `json:"tasks"` }
type Participant ¶
type Ref ¶
type Ref struct { ID string `json:"id"` DisplayID string `json:"displayId"` LatestCommit string `json:"latestCommit"` Repository struct { Slug string `json:"slug"` ID int `json:"id"` Name string `json:"name"` ScmID string `json:"scmId"` State string `json:"state"` StatusMessage string `json:"statusMessage"` Forkable bool `json:"forkable"` Project struct { Key string `json:"key"` ID int `json:"id"` Name string `json:"name"` Public bool `json:"public"` Type string `json:"type"` } `json:"project"` Public bool `json:"public"` } `json:"repository"` }
type WebhookBody ¶
type WebhookBody struct { BitbucketURL string `json:"bitbucketURL"` EventKey string `json:"eventKey"` Date string `json:"date"` Actor User `json:"actor"` PullRequest struct { ID int `json:"id"` Version int `json:"version"` Title string `json:"title"` Description string `json:"description"` State string `json:"state"` Open bool `json:"open"` Closed bool `json:"closed"` CreatedDate int64 `json:"createdDate"` UpdatedDate int64 `json:"updatedDate"` Locked bool `json:"locked"` ToRef Ref `json:"toRef"` FromRef Ref `json:"fromRef"` Author struct { User User `json:"user"` Role string `json:"role"` Approved bool `json:"approved"` Status string `json:"status"` } `json:"author"` Reviewers []struct { User User `json:"user"` LastReviewedCommit string `json:"lastReviewedCommit"` Role string `json:"role"` Approved bool `json:"approved"` Status string `json:"status"` } `json:"reviewers"` Participants []interface{} `json:"participants"` } `json:"pullRequest"` // Comment is present if eventKey is pr:comment... Comment *Comment `json:"comment"` // Participant is present if eventKey is pr:reviewer... Participant *Participant `json:"participant"` // PreviousStatus is present if eventKey is pr:reviewer:approved , pr:reviewer:unapproved, pr:reviewer:needs_work PreviousStatus string `json:"previousStatus"` AddedReviewers []User `json:"addedReviewers"` RemovedReviewers []User `json:"removedReviewers"` }
func (WebhookBody) ApprovedCount ¶
func (w WebhookBody) ApprovedCount() int
func (WebhookBody) FormatMessage ¶
func (w WebhookBody) FormatMessage(msg string, action string) []slack.MsgOption
func (WebhookBody) GetPrURL ¶
func (w WebhookBody) GetPrURL() string
Click to show internal directories.
Click to hide internal directories.