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

Function getSlackForkPayload

internal/database/webhook_slack.go:92–99  ·  view source on GitHub ↗

getSlackForkPayload composes Slack payload for forked by a repository.

(p *api.ForkPayload)

Source from the content-addressed store, hash-verified

90
91// getSlackForkPayload composes Slack payload for forked by a repository.
92func getSlackForkPayload(p *api.ForkPayload) *SlackPayload {
93 baseLink := SlackLinkFormatter(p.Repo.HTMLURL, p.Repo.Name)
94 forkLink := SlackLinkFormatter(p.Forkee.HTMLURL, p.Forkee.FullName)
95 text := fmt.Sprintf("%s is forked to %s", baseLink, forkLink)
96 return &SlackPayload{
97 Text: text,
98 }
99}
100
101func getSlackPushPayload(p *api.PushPayload, slack *SlackMeta) *SlackPayload {
102 // n new commits

Callers 1

GetSlackPayloadFunction · 0.85

Calls 1

SlackLinkFormatterFunction · 0.85

Tested by

no test coverage detected