Closed Bug 1201853 Opened 6 years ago Closed 6 years ago

Reviewer detection from commit message case-sensitive?

Categories

(MozReview Graveyard :: General, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ted, Assigned: dminor)

References

Details

Attachments

(1 file)

I pushed a review that had "?ryanvm" at the end:
https://reviewboard.mozilla.org/r/18281/

and got:
```
unrecognized reviewer: ryanvm
```

I went to the reviewboard page, clicked edit, typed in 'ryanvm', and it autocompleted to 'RyanVM'.

Is the reviewer detection from commit messages case sensitive?
The initial search here [1] is case-insensitive, but if that returns multiple results, we look for an exact match here [2] which I suspect is case-sensitive. We'd prefer to only do the second search but the first is required to trigger mirroring of Bugzilla users over to MozReview.

If the second search fails to match, we could potentially iterate on the first results and do case insensitive comparisons to find try to find a match.

More fun would be to add an interactive mode where if the reviewer couldn't be identified, we used something like the auto-complete logic in the UI to help someone identify a reviewer, and then rewrite the commit message to have the proper reviewer.

[1] https://dxr.mozilla.org/hgcustom_version-control-tools/source/pylib/reviewboardmods/reviewboardmods/pushhooks.py#178
[2] https://dxr.mozilla.org/hgcustom_version-control-tools/source/pylib/reviewboardmods/reviewboardmods/pushhooks.py#197
Priority: -- → P4
FWIW, it's the second time this week that someone tags r?felipe and I don't get notified of the review request and just by luck I noticed the issue.
I'm planning to do some work on reviewer flagging anyway, so I'll pick this one up.
Assignee: nobody → dminor
mozreview: make commit syntax for specifying reviewers case-insensitive (bug 1201853) r?smacleod

We have a few users who have capitals in their ircnicks. Bugzilla (and the
MozReview UI) will auto-complete these properly, but using r? in the syntax
fails to do so leading to confusion.

This adds a loop over the results of get_users (which is case insensitive)
first looking for an exact match, and if that fails, a case insensitive match.
The call to get_user is removed, as it is always case sensitive.
Attachment #8668024 - Flags: review?(smacleod)
Status: NEW → ASSIGNED
Comment on attachment 8668024 [details]
MozReview Request: mozreview: make commit syntax for specifying reviewers case-insensitive (bug 1201853) r?smacleod

https://reviewboard.mozilla.org/r/20871/#review18745

I'll steal this review.
Attachment #8668024 - Flags: review+
Thanks!

https://hg.mozilla.org/hgcustom/version-control-tools/rev/aa460b6812a0
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Blocks: 1212358
Attachment #8668024 - Flags: review?(smacleod)
Product: Developer Services → MozReview
You need to log in before you can comment on or make changes to this bug.