getSlackForkPayload composes Slack payload for forked by a repository.
(p *api.ForkPayload)
| 90 | |
| 91 | // getSlackForkPayload composes Slack payload for forked by a repository. |
| 92 | func 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 | |
| 101 | func getSlackPushPayload(p *api.PushPayload, slack *SlackMeta) *SlackPayload { |
| 102 | // n new commits |
no test coverage detected