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

Same reviewer tagged several times. #27

Open
maksymiliev opened this issue Sep 21, 2021 · 3 comments
Open

Same reviewer tagged several times. #27

maksymiliev opened this issue Sep 21, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@maksymiliev
Copy link

maksymiliev commented Sep 21, 2021

It seems like the bot has an issue where it fails to tag a correct reviewer and instead tags a different reviewer, resulting in one reviewer being tagged several times.

In the screenshot below you can see @maksym Iliev has been tagged 2 times, even though there should've been a different person tagged the second time instead of tagging @maksym Iliev again.

The Reviewer file has the correct mapping of gitlab username to slack ID just like provided in examples.

image

@maksymiliev maksymiliev changed the title Tagging the same person several times Same reviewer tagged several times. Sep 21, 2021
@maksymiliev
Copy link
Author

maksymiliev commented Oct 18, 2021

Update:

Issue seems to be related with how the bot assesses reviewers that have approved the pull/merge request and those that haven't.

Instead, I have changed the template file to simply show all reviewers in the merge/pull request:

*<{{.Project.WebURL}}|{{.Project.Name}}>* Merge Requests:


{{range .Reminders}}
*<{{.MR.WebURL}}|{{.MR.Title}}>*
{{if .Discussions}} {{.Discussions}} :speech_balloon: {{end}} {{range $emoji, $count := .Emojis}} {{$count}} :{{$emoji}}: {{end}}
{{range .MR.Reviewers}}
<@{{.Username}}> {{end}}
{{end}}

@sj14 sj14 added the bug Something isn't working label Oct 22, 2021
@sj14
Copy link
Owner

sj14 commented Oct 22, 2021

Thanks for the feedback. This needs investigation.

@sj14
Copy link
Owner

sj14 commented Oct 22, 2021

if mr.Author != nil {

getReviewed() is only considering the Author of the MR as the possible owner, but the owner could be determined as someone else later in the processing.

func responsiblePerson(mr *gitlab.MergeRequest, reviewers map[string]string) string {

Maybe that's the issue but at the moment I don't have a working test setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants