1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

update slack hook to use new format

This commit is contained in:
Christopher Brickley
2014-10-24 08:56:12 -04:00
parent d7ea49b9f5
commit 3794111460
4 changed files with 5 additions and 24 deletions

View File

@@ -16,8 +16,6 @@ const (
)
type Slack struct {
Domain string `json:"domain"`
Token string `json:"token"`
Channel string `json:"channel"`
}
@@ -36,14 +34,6 @@ type SlackAttachment struct {
Text string `json:"text"`
}
func GetSlackURL(domain string, token string) string {
return fmt.Sprintf(
"https://%s.slack.com/services/hooks/incoming-webhook?token=%s",
domain,
token,
)
}
func (p SlackPayload) GetJSONPayload() ([]byte, error) {
data, err := json.Marshal(p)
if err != nil {