Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhooks don't always resolve username #254

Open
apollo13 opened this issue Jul 27, 2021 · 3 comments
Open

Webhooks don't always resolve username #254

apollo13 opened this issue Jul 27, 2021 · 3 comments
Labels
Help Wanted Community help wanted Tech/Go Type/Enhancement New feature or improvement of existing feature Up For Grabs Ready for help from the community. Removed when someone volunteers
Milestone

Comments

@apollo13
Copy link
Contributor

Creating tags and issues yields the following:

image

It seems as if

senderGitlabUsername := w.gitlabRetreiver.GetUsernameByID(event.UserID)

goes awry. couldn't it just use UserName directly?

@apollo13
Copy link
Contributor Author

GetUsernameByID goes through

func (p *Plugin) getGitlabIDToUsernameMapping(gitlabUserID string) string {
gitlabUsername, err := p.API.KVGet(gitlabUserID + GitlabIDUsernameKey)
if err != nil {
p.API.LogError("can't get user id by login", "err", err.DetailedError)
}
return string(gitlabUsername)
}

and seems to ask mattermost itself for an id mapping?

@apollo13
Copy link
Contributor Author

apollo13 commented Jul 27, 2021

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
Copy link
Contributor Author

Currently blocked by xanzy/go-gitlab#1183

@mickmister mickmister added this to the Planned Work milestone Jan 12, 2022
@mickmister mickmister added Help Wanted Community help wanted Tech/Go Type/Enhancement New feature or improvement of existing feature Up For Grabs Ready for help from the community. Removed when someone volunteers labels Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Community help wanted Tech/Go Type/Enhancement New feature or improvement of existing feature Up For Grabs Ready for help from the community. Removed when someone volunteers
Projects
None yet
Development

No branches or pull requests

2 participants