RESOLVED FIXED Bug 63351
webkit-patch should be able to find users and add them to bugzilla groups
https://bugs.webkit.org/show_bug.cgi?id=63351
Summary webkit-patch should be able to find users and add them to bugzilla groups
Eric Seidel (no email)
Reported 2011-06-24 13:37:56 PDT
webkit-patch should be able to find users and add them to bugzilla groups
Attachments
Patch (19.75 KB, patch)
2011-06-24 13:40 PDT, Eric Seidel (no email)
no flags
Fix one exception (19.73 KB, patch)
2011-06-24 13:48 PDT, Eric Seidel (no email)
abarth: review+
Adam Roben (:aroben)
Comment 1 2011-06-24 13:39:39 PDT
The name "webkit-patch" is getting less and less accurate. Should we be using separate scripts for things like this? Or renaming webkit-patch?
Eric Seidel (no email)
Comment 2 2011-06-24 13:40:46 PDT
Adam Barth
Comment 3 2011-06-24 13:41:18 PDT
webkit-patch has never been an accurate name. Suggestions welcome. We've also wanted to be able to have separate collections of commands, but never quite finished the refactoring necessary to make that happen.
Ojan Vafai
Comment 4 2011-06-24 13:42:07 PDT
Meh. I prefer having one tool. It means that "webkit-patch --all-commands" shows you each command with a description of what it does instead of just seeing the list of all the scripts without description of what they do.
Eric Seidel (no email)
Comment 5 2011-06-24 13:44:49 PDT
Here is an example of using the new add-users-to-groups command: webkit-patch add-users-to-groups sullivan@chromium.org Add users matching "sullivan@chromium.org" which groups? 1. canconfirm 2. editbugs Enter one or more numbers (comma-separated), or "all": Logging in as eric@webkit.org... Found 1 users matching sullivan@chromium.org: sullivan@chromium.org (15086) Are you sure you want add 1 users to groups ['canconfirm', 'editbugs']? (This action cannot be undone using webkit-patch.) [Y/n]: Adding sullivan@chromium.org to ['canconfirm', 'editbugs'] With this we could grant editbugs/canconfirm to all of @chromium.org or @mozilla.org at once (or whatever policy decision we'd like to make).
Eric Seidel (no email)
Comment 6 2011-06-24 13:47:26 PDT
Here is an example of running find-users: webkit-patch find-users chromium.org Logging in as eric@webkit.org... Aaron Boodman <aa@chromium.org> (8238) (canconfirm, editbugs) Andrey Adaikin <aandrey@chromium.org> (14805) (editbugs) Alice Boxhall <aboxhall@chromium.org> (14625) (canconfirm, editbugs) Aaron Colwell <acolwell@chromium.org> (13774) (none) Adam Klein <adamk@chromium.org> (14354) (canconfirm, editbugs) Mads Ager <ager@chromium.org> (8890) (canconfirm, editbugs) Adam Langley <agl@chromium.org> (8744) (canconfirm, editbugs) Albert J. Wong <ajwong@chromium.org> (9759) (canconfirm, editbugs) <akalin@chromium.org> (15464) (none) Alok Priyadarshi <alokp@chromium.org> (11778) (editbugs) Amanda Walker <amanda@chromium.org> (8123) (none) Alexey Marinichev <amarinichev@chromium.org> (13251) (editbugs) Amit Joshi <amit@chromium.org> (9485) (none) The UI for both of these commands could be improved, but this works for a first-cut.
Eric Seidel (no email)
Comment 7 2011-06-24 13:48:40 PDT
Created attachment 98536 [details] Fix one exception
Eric Seidel (no email)
Comment 8 2011-06-24 13:51:24 PDT
*** Bug 34179 has been marked as a duplicate of this bug. ***
Eric Seidel (no email)
Comment 9 2011-09-13 16:52:19 PDT
can haz review? This came up again when another @chromium.org person emailed me to be added to edit bugs. I'd like to automate this.
Adam Barth
Comment 10 2011-09-13 17:01:12 PDT
Clearly I need to troll pending-review more.
Adam Barth
Comment 11 2011-09-13 17:07:29 PDT
Comment on attachment 98536 [details] Fix one exception View in context: https://bugs.webkit.org/attachment.cgi?id=98536&action=review > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:54 > + self._group_name_to_group_string_cache = {} Should this use a memoized function instead? > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:71 > + soup = BeautifulSoup(results_page, convertEntities=BeautifulStoneSoup.HTML_ENTITIES) There's no XML version of this page? > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:268 > + self.edit_user_parser = EditUsersParser() Do we want this to be persistent or instantiated each time? Maybe it doen't matter since the process isn't long-lived. > Tools/Scripts/webkitpy/tool/commands/__init__.py:8 > +from webkitpy.tool.commands.adduserstogroups import AddUsersToGroups > from webkitpy.tool.commands.bugsearch import BugSearch > from webkitpy.tool.commands.bugfortest import BugForTest > from webkitpy.tool.commands.download import * > from webkitpy.tool.commands.earlywarningsystem import * > +from webkitpy.tool.commands.findusers import * Not really related to this patch, but we should clean up whether this file always uses *, etc.
David Levin
Comment 12 2011-09-13 17:15:34 PDT
(In reply to comment #3) > webkit-patch has never been an accurate name. Suggestions welcome. > webkit-swiss-army-knife?
Eric Seidel (no email)
Comment 13 2011-09-15 15:00:44 PDT
(In reply to comment #11) > (From update of attachment 98536 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=98536&action=review > > > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:54 > > + self._group_name_to_group_string_cache = {} > > Should this use a memoized function instead? Possibly. It gets awkward because we're passing in the edit page. > > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:71 > > + soup = BeautifulSoup(results_page, convertEntities=BeautifulStoneSoup.HTML_ENTITIES) > > There's no XML version of this page? Sadly no. > > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:268 > > + self.edit_user_parser = EditUsersParser() > > Do we want this to be persistent or instantiated each time? Maybe it doen't matter since the process isn't long-lived. Doesn't really matter. Since bugzilla is a singleton anyway, I'm not going to worry. > > Tools/Scripts/webkitpy/tool/commands/__init__.py:8 > > +from webkitpy.tool.commands.adduserstogroups import AddUsersToGroups > > from webkitpy.tool.commands.bugsearch import BugSearch > > from webkitpy.tool.commands.bugfortest import BugForTest > > from webkitpy.tool.commands.download import * > > from webkitpy.tool.commands.earlywarningsystem import * > > +from webkitpy.tool.commands.findusers import * > > Not really related to this patch, but we should clean up whether this file always uses *, etc. Agreed.
Eric Seidel (no email)
Comment 14 2011-09-15 15:09:51 PDT
Note You need to log in before you can comment on or make changes to this bug.