Documentation ¶
Index ¶
- func GetNotificationAnnotations(gh *ghapi.GitHook) map[string]string
- func ShouldNotify(annotations map[string]string) bool
- func ShouldNotifyStarted(annotations map[string]string) bool
- type Config
- type GithubConfig
- type GithubStatus
- type PatchAnnotations
- type SlackAttachment
- type SlackAttachmentField
- type SlackConfig
- type SlackMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShouldNotify ¶
func ShouldNotifyStarted ¶
Types ¶
type Config ¶
type Config struct { Github map[string]GithubConfig `json:"github"` Slack map[string]SlackConfig `json:"slack"` }
func LoadConfig ¶
type GithubConfig ¶
type GithubStatus ¶
type GithubStatus struct { State string `json:"state,omitempty"` TargetURL string `json:"target_url,omitempty"` Description string `json:"description,omitempty"` Context string `json:"context,omitempty"` }
func (GithubStatus) SendGithubStatus ¶
func (s GithubStatus) SendGithubStatus(token string, apiURL string) error
type PatchAnnotations ¶
func NewRemoveNotificationPatch ¶
func NewRemoveNotificationPatch(annotations map[string]string) []PatchAnnotations
func NewRemoveStartedPatch ¶
func NewRemoveStartedPatch() []PatchAnnotations
type SlackAttachment ¶
type SlackAttachmentField ¶
type SlackConfig ¶
type SlackMessage ¶
type SlackMessage struct { Channel string `json:"channel,omitempty"` Username string `json:"username,omitempty"` IconURL string `json:"icon_url,omitempty"` Attachments []SlackAttachment `json:"attachments"` }
func NewSlackMessage ¶
func NewSlackMessage(color, channel, url, title, text, fallback, repository, author, branch, commit string) SlackMessage
func (SlackMessage) SendSlackMessage ¶
func (m SlackMessage) SendSlackMessage(webhookURL string) error
Click to show internal directories.
Click to hide internal directories.