Adds additional conditions to provide more options for matching reviews

Review Request #9586 — Created Feb. 5, 2018 and submitted

Information

Review Board
master
fd94cbd...

Reviewers

This enhancement allows for more control of review request matching with Integrations.

Provides the ability to match against one or more assigned reviewers or participants.

Tested locally with Slack integration.

Added unit tests.

Description From Last Updated

Could you add some tests for these choices in reviewboard/reviews/tests/test_conditions.py?

daviddavid

E128 continuation line under-indented for visual indent

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

E128 continuation line under-indented for visual indent

reviewbotreviewbot

You can do: **kwargs (dict, unused): Unused keyword arguments. and our doc processor will understand that.

daviddavid

This should be list of django.contrib.auth.models.User

daviddavid

You can do: **kwargs (dict, unused): Unused keyword arguments. and our doc processor will understand that.

daviddavid

This should be list of django.contrib.auth.models.User

daviddavid

E501 line too long (83 > 79 characters)

reviewbotreviewbot

E501 line too long (83 > 79 characters)

reviewbotreviewbot

E501 line too long (95 > 79 characters)

reviewbotreviewbot

E501 line too long (95 > 79 characters)

reviewbotreviewbot

E501 line too long (95 > 79 characters)

reviewbotreviewbot

E501 line too long (95 > 79 characters)

reviewbotreviewbot

E501 line too long (107 > 79 characters)

reviewbotreviewbot

E501 line too long (107 > 79 characters)

reviewbotreviewbot

E501 line too long (107 > 79 characters)

reviewbotreviewbot

E501 line too long (83 > 79 characters)

reviewbotreviewbot

E501 line too long (83 > 79 characters)

reviewbotreviewbot

E501 line too long (83 > 79 characters)

reviewbotreviewbot

E501 line too long (95 > 79 characters)

reviewbotreviewbot

E501 line too long (95 > 79 characters)

reviewbotreviewbot

E501 line too long (107 > 79 characters)

reviewbotreviewbot

E501 line too long (107 > 79 characters)

reviewbotreviewbot

E501 line too long (107 > 79 characters)

reviewbotreviewbot

E501 line too long (83 > 79 characters)

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

E501 line too long (86 > 79 characters)

reviewbotreviewbot

E501 line too long (86 > 79 characters)

reviewbotreviewbot

E501 line too long (86 > 79 characters)

reviewbotreviewbot

E501 line too long (86 > 79 characters)

reviewbotreviewbot

E501 line too long (86 > 79 characters)

reviewbotreviewbot

E501 line too long (86 > 79 characters)

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

SH
jcannon
  1. 
      
  2. What's the status of this? Last update was almost 5 months ago.

    Our team wants to use the Review Bot extension, but not being able to choose "Reviewer" as a condition for when a bot runs is pretty painful.

    1. Joushua,
      I am not sure why this is not getting merged in. As you mention, this was submitted a long time and it's a pretty simple change. Perhaps if some users comment on the associated ticket to show interest it will get taken care of.

      In order to use this functionality, I just applied the patch to my installed version of ReviewBoard. It's easy to do since it's editable python code. Just find the reviews/conditions.py file and add the necessary lines. On CentOS/RH for example, the file is at /usr/lib64/python2.7/site-packages/reviewboard/reviews/conditions.py. Note that there are multiple conditions.py files, the one that needs to be patched is under reviews/

    2. I patched it on my demo server where we're trying out bots and it works like a charm. 👍

      We'd feel much more comfortable with a local patch knowing at least that the change was accepted by Review Board.

    3. Sorry, we've just been very busy.

  3. 
      
david
  1. 
      
  2. Show all issues

    Could you add some tests for these choices in reviewboard/reviews/tests/test_conditions.py?

    1. David,

      I have added some unit tests and resolved all the issues here. Can we get this moved along now?

      Thanks!

  3. reviewboard/reviews/conditions.py (Diff revision 2)
     
     
     
    Show all issues

    You can do:

    **kwargs (dict, unused):
        Unused keyword arguments.
    

    and our doc processor will understand that.

  4. reviewboard/reviews/conditions.py (Diff revision 2)
     
     
    Show all issues

    This should be list of django.contrib.auth.models.User

  5. reviewboard/reviews/conditions.py (Diff revision 2)
     
     
     
    Show all issues

    You can do:

    **kwargs (dict, unused):
        Unused keyword arguments.
    

    and our doc processor will understand that.

  6. reviewboard/reviews/conditions.py (Diff revision 2)
     
     
    Show all issues

    This should be list of django.contrib.auth.models.User

  7. 
      
SH
SH
Review request changed
Change Summary:

Add unit tests.

Testing Done:
   

Tested locally with Slack integration.

  +
  +

Added unit tests.

Commit:
4fcfe9503f0f2a9b081fb35251d78ce480ddf1e6
73dde5093fbce134fef8402579be932a7f666603

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

SH
Review request changed
Change Summary:

Fix formatting issues.

Commit:
73dde5093fbce134fef8402579be932a7f666603
3b9ff249e595b0355ed800327b6bc0b08566640f

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

SH
david
  1. Ship It!
  2. 
      
SH
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (3f16e77)