mattermost-plugin-gitlab icon indicating copy to clipboard operation
mattermost-plugin-gitlab copied to clipboard

Webhooks don't always resolve username

Open apollo13 opened this issue 4 years ago • 3 comments
trafficstars

Creating tags and issues yields the following:

image

It seems as if https://github.com/mattermost/mattermost-plugin-gitlab/blob/442334dbe0ec95127d7d7f50330aaea3adbbe71a/server/webhook/tag.go#L43 goes awry. couldn't it just use UserName directly?

apollo13 avatar Jul 27 '21 14:07 apollo13

GetUsernameByID goes through https://github.com/mattermost/mattermost-plugin-gitlab/blob/442334dbe0ec95127d7d7f50330aaea3adbbe71a/server/plugin.go#L208-L214

and seems to ask mattermost itself for an id mapping?

apollo13 avatar Jul 27 '21 14:07 apollo13

Interesting, after executing /gitlab settings notifications on the username is resolved properly. Nevertheless I do not think this is the expected behavior and this KV-mapping shouldn't be used?

apollo13 avatar Jul 27 '21 15:07 apollo13

Currently blocked by https://github.com/xanzy/go-gitlab/pull/1183

apollo13 avatar Jul 28 '21 07:07 apollo13