Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PostWebhook ¶
func PostWebhook(msg *WebhookMessage) error
PostWebhook posts a WebhookMessage to slack
Types ¶
type Attachment ¶
type Attachment struct { Color string `json:"color,omitempty"` Title string `json:"title,omitempty"` TitleLink string `json:"title_link,omitempty"` Pretext string `json:"pretext,omitempty"` Text string `json:"text"` ImageURL string `json:"image_url,omitempty"` ThumbURL string `json:"thumb_url,omitempty"` MarkdownIn []string `json:"mrkdwn_in,omitempty"` }
Attachment contains the information needed for release note attachments
func (*Attachment) UsePullRequests ¶
func (a *Attachment) UsePullRequests(prs []github.PullRequest)
UsePullRequests formats the data from pull requests and adds them to the attachment
type WebhookMessage ¶
type WebhookMessage struct { Channel string `json:"channel"` Username string `json:"username,omitempty"` IconURL string `json:"icon_url,omitempty"` Text string `json:"text,omitempty"` Attachments []Attachment `json:"attachments,omitempty"` }
WebhookMessage holds the message to send to slack
Click to show internal directories.
Click to hide internal directories.