Skip to content

Commit 28c5ae2

Browse files
WGH-techknowlogick
authored andcommitted
Fix Slack webhook fork message (#7774)
The order of forkee and fork was mixed up.
1 parent 0470b16 commit 28c5ae2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/webhook_slack.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ func getSlackDeletePayload(p *api.DeletePayload, slack *SlackMeta) (*SlackPayloa
120120

121121
// getSlackForkPayload composes Slack payload for forked by a repository.
122122
func getSlackForkPayload(p *api.ForkPayload, slack *SlackMeta) (*SlackPayload, error) {
123-
baseLink := SlackLinkFormatter(p.Repo.HTMLURL, p.Repo.Name)
124-
forkLink := SlackLinkFormatter(p.Forkee.HTMLURL, p.Forkee.FullName)
123+
baseLink := SlackLinkFormatter(p.Forkee.HTMLURL, p.Forkee.FullName)
124+
forkLink := SlackLinkFormatter(p.Repo.HTMLURL, p.Repo.FullName)
125125
text := fmt.Sprintf("%s is forked to %s", baseLink, forkLink)
126126
return &SlackPayload{
127127
Channel: slack.Channel,

0 commit comments

Comments
 (0)