From e5c5080f26669e816a23af4dae9b505150e5bcca Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Thu, 6 Aug 2020 01:18:21 +0200 Subject: [PATCH] In issue comments, put issue participants also in completion list when hitting @ (#12433) Previous behaviour was only to have completion for project members --- templates/base/head.tmpl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index a0710a77bc7..61e8f39ac9d 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -78,12 +78,16 @@ EventSourceUpdateTime: {{NotificationSettings.EventSourceUpdateTime}}, }, {{if .RequireTribute}} - tributeValues: [ + tributeValues: Array.from(new Map([ + {{ range .Participants }} + ['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}', + name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'}], + {{ end }} {{ range .Assignees }} - {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}', - name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'}, + ['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}', + name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'}], {{ end }} - ], + ]).values()), {{end}} };