-
-
rbauto_assigner/rbauto_assigner/admin_urls.py (Diff revision 1) 'RBAutoAssigner' imported but unused
-
-
Create extension for auto-assigning students to the students group
Review Request #7856 — Created Jan. 8, 2016 and discarded
A simple extension for auto-assigning students working on Review Board to
the "students" group.I can imagine this maybe being useful for other projects as well, so I can
see this expanding out to allow multiple auto-assignments, but for now I've
just hard-coded the "students" group.
Created some test users and a "students" group. Entered the extension
configuration page and added some users in the comma-separated list to
auto-assign. Created review requests for the users in the list and saw
that they were correctly added to the "students" group. The review requests
from the other users were not.
Description | From | Last Updated |
---|---|---|
'RBAutoAssigner' imported but unused |
reviewbot | |
'json' imported but unused |
reviewbot | |
Single quotes. |
brennie | |
Blank line here. |
brennie | |
Same here. |
brennie | |
And here. |
brennie | |
logging.info, etc will do % interpolation with positional arguments, so you can do: logging.info('foo %s', bar) |
brennie | |
Col: 80 E501 line too long (100 > 79 characters) |
reviewbot | |
Single quotes |
brennie | |
Prefer MANIFEST.in over package_data |
brennie | |
Instead of doing this on publish, what about on create? |
david | |
I don't think we care if they've joined the group or not. |
david | |
Would be better to do Group.objects.get(name=self.auto_assign_group) and catch Group.DoesNotExist |
david | |
Not possible. |
david | |
Limiting to 40 characters means we won't be able to put in very many usernames. |
david |
-
-
-
-
-
-
rbauto_assigner/rbauto_assigner/extension.py (Diff revision 1) logging.info
, etc will do%
interpolation with positional arguments, so you can do:logging.info('foo %s', bar)
Change Summary:
I've made it so that the extension can be configured with a
comma-separated list of student usernames. This way, we don't
end up auto-assigning review requests from everybody in the
students group (since that could include mentors).
Testing Done: |
|
|||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
|||||||||||||||||||||
Diff: |
Revision 2 (+128) |
-
Tool: PEP8 Style Checker Processed Files: rbauto_assigner/rbauto_assigner/admin_urls.py rbauto_assigner/rbauto_assigner/extension.py rbauto_assigner/setup.py rbauto_assigner/rbauto_assigner/forms.py Ignored Files: rbauto_assigner/rbauto_assigner/__init__.py
-
Given that this is currently highly student-specific (right now), instead of putting it in rb-extension-pack, how about in the
misc/
directory of the student-sonar repository? We can always move it when/if we make it more generic. -
rbauto_assigner/rbauto_assigner/extension.py (Diff revision 2) Instead of doing this on publish, what about on create?
-
rbauto_assigner/rbauto_assigner/extension.py (Diff revision 2) I don't think we care if they've joined the group or not.
-
rbauto_assigner/rbauto_assigner/extension.py (Diff revision 2) Would be better to do
Group.objects.get(name=self.auto_assign_group)
and catchGroup.DoesNotExist
-
-
rbauto_assigner/rbauto_assigner/forms.py (Diff revision 2) Limiting to 40 characters means we won't be able to put in very many usernames.