Mach should provide a way to easily identify a recommended reviewer for a patch.
What this is really asking for is a way to identify stakeholders in a file. An obvious application is to find reviewers for a patch. But, it could also be used to look up who to contact with questions on a specific file. Perhaps this could interact with the mozillians.org phonebook (is there an API) to retrieve contact information, etc.
I think this goes beyond just `hg blame` because it will need to parse commit messages to extract the reviewer. It's not enough to just look at the author of a commit because they may not be a reviewer.
This is interesting. I think that there are really two parts to this, and we should perhaps separate them.
1) algorithmic part of figuring out who a good reviewer is for a patch
2) exposing that in mach
Part 1 would be equally or even more useful in bugzilla and is one of the short list of bugzilla improvements that we really want but haven't had time for; so I personally think we should try to expose that as a web service that can be access both from mach and from bugzilla.
(In reply to Benjamin Smedberg [:bsmedberg] from comment #1)
> This is interesting. I think that there are really two parts to this, and we
> should perhaps separate them.
> 1) algorithmic part of figuring out who a good reviewer is for a patch
> 2) exposing that in mach
We will definitely separate them. mach is really just a frontend to a bunch of Python modules in the mozbuild (and other) packages. Making everything a library is a requirement for getting r+ on new mach/mozbuild features.
> Part 1 would be equally or even more useful in bugzilla and is one of the
> short list of bugzilla improvements that we really want but haven't had time
> for; so I personally think we should try to expose that as a web service
> that can be access both from mach and from bugzilla.
That's a cool idea! Are there any bugs on file?
glob says there are no existing bugs files for bugzilla integration, I'll rectify that.
sfink says https://bitbucket.org/sfink/mqext/ has `hg reviewers`
Mercy on high this is a great idea
See https://github.com/bwinton/Mozilla-Tools/blob/master/getReviewer.py for some code that might be integratable.
(In reply to Josh Matthews [:jdm] from comment #5)
> See https://github.com/bwinton/Mozilla-Tools/blob/master/getReviewer.py for
> some code that might be integratable.
I think that's the code I started with for mqext's |hg reviewers|. I don't think I added much that was unrelated to the hg integration, though I may have modified the regexes a bit.
This one's on me as a q3 goal.
A polite little bump. Any action going on? I would love to have this feature!
I don't know of any activity, but just to be sure you're aware of the status quo:
- mach mercurial-setup will install mqext, which includes an |hg reviewers| command.
- |hg reviewers| by default will look at the top patch in your mq queue.
- |hg reviewers -f <filename>| will give you reviewers for a particular file.
- the IRC bot "mrgiggles" will run the above command for you. Example:
/msg mrgiggles who has reviewed nsJSEnvironment.cpp?
will give you back a response like
smaug x 59, mccr8 x 24, bz x 19
(You'll also see people ask publicly in channels that mrgiggles hangs out in, usually using the syntax "who can review XXX.cpp?". And if you want mrgiggles in another channel, just /invite him.)
None of this is to say that this bug is unnecessary. It would be best if this functionality were incorporated into mach.