summaryrefslogtreecommitdiffstats
path: root/models/webhook_slack.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/webhook_slack.go')
-rw-r--r--models/webhook_slack.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/webhook_slack.go b/models/webhook_slack.go
index 5c67951fba..90d5ccce0b 100644
--- a/models/webhook_slack.go
+++ b/models/webhook_slack.go
@@ -301,12 +301,12 @@ func getSlackPullRequestPayload(p *api.PullRequestPayload, slack *SlackMeta) (*S
text = fmt.Sprintf("[%s] Pull request edited: %s by %s", p.Repository.FullName, titleLink, senderLink)
attachmentText = SlackTextFormatter(p.PullRequest.Body)
case api.HookIssueAssigned:
- list, err := MakeAssigneeList(&Issue{ID: p.PullRequest.ID})
- if err != nil {
- return &SlackPayload{}, err
+ list := make([]string, len(p.PullRequest.Assignees))
+ for i, user := range p.PullRequest.Assignees {
+ list[i] = SlackLinkFormatter(setting.AppURL+user.UserName, user.UserName)
}
text = fmt.Sprintf("[%s] Pull request assigned to %s: %s by %s", p.Repository.FullName,
- SlackLinkFormatter(setting.AppURL+list, list),
+ strings.Join(list, ", "),
titleLink, senderLink)
case api.HookIssueUnassigned:
text = fmt.Sprintf("[%s] Pull request unassigned: %s by %s", p.Repository.FullName, titleLink, senderLink)