MCPcopy Create free account
hub / github.com/gogs/gogs / getSlackReleasePayload

Function getSlackReleasePayload

internal/database/webhook_slack.go:278–285  ·  view source on GitHub ↗
(p *api.ReleasePayload)

Source from the content-addressed store, hash-verified

276}
277
278func getSlackReleasePayload(p *api.ReleasePayload) *SlackPayload {
279 repoLink := SlackLinkFormatter(p.Repository.HTMLURL, p.Repository.Name)
280 refLink := SlackLinkFormatter(p.Repository.HTMLURL+"/src/"+p.Release.TagName, p.Release.TagName)
281 text := fmt.Sprintf("[%s] new release %s published by %s", repoLink, refLink, p.Sender.UserName)
282 return &SlackPayload{
283 Text: text,
284 }
285}
286
287func GetSlackPayload(p api.Payloader, event HookEventType, meta string) (payload *SlackPayload, err error) {
288 slack := &SlackMeta{}

Callers 1

GetSlackPayloadFunction · 0.85

Calls 1

SlackLinkFormatterFunction · 0.85

Tested by

no test coverage detected