Deeper Bug Tracker Integrations

Review Request #9544 — Created Jan. 27, 2018 and updated

jcorrive
Review Board
master
e59c334...
reviewboard, students

Added options to the Github repository form to enable posting
to a Github issue when a bug is first mentioned or when a
review request referencing a bug is updated and closing a
Github issue when a Review Request is closed.
Added properties to Repository for the new bug tracker
integration options.
Added new methods to HostingService that are called when the
review request is closed or updated to take care of these
deeper bug tracking options.
Added the ability to post to bug on first reference.
Added a bug tracker form to HostingService.
Updated RepositoryForm to use the new bug tracker form in the
bug tracker section if it exists.

Created unit tests in reviewboard.hostingsvcs.tests.test_github.py
Tested everything with a private GitHub repo and a local reviewboard instance.

  • 3
  • 0
  • 45
  • 24
  • 72
Description From Last Updated
E722 do not use bare except' reviewbot reviewbot
E722 do not use bare except' reviewbot reviewbot
E722 do not use bare except' reviewbot reviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

Review request changed

Description:

   

Added boolean flags to HostingServices to see whether the repository

    supports posting to a bug tracker when a change is posted, closing a bug
    when a reviw request is closed, or notifying a bug tracker when there's
    new reviews or review requests for the bug.

   
   

Added a couple extra checkboxes to the Github repository form to enable

    these options.

  +
  +
  +
  +

Added a new method to HostingService that is called when the

  + review_request_closed signal is sent.

  +
  +

  +
  +

Added a field to the Private Github repository fields to get the value

  + from an extra checkbox to enable the new options for configuring a bug
  + tracker.

  +
  +
  +
  +

Modified review_request_closed method to close the bug when the Review

  + Request is closed if enable_closing_remote_bug is set to True.

  +
  +

  +
  +

Added methods to github.py and hostingservices.py to enable sending an

  + HTTP Patch request in order to allow closing a Github Issue.

  +
  +
  +
  +

Added a method to post to a github issue when a ReviewRequest is

  + updated.

Commit:

-98c280f00197e0c99a751a5fcb70e226f002f4e6
+d34e02768cbc4cd2dfc9e5e6c077563b115e5f23

Diff:

Revision 2 (+239)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

david
  1. 
      
  2. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
     

    "Enable ..." is a little bit passive. How about:

    "Post an update to the bug tracker when review requests or reviews are published."

  3. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     

    How is this different from the posting/closing bits? Can we just use those and skip this one?

  4. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     

    Same sort of comment here:

    "Close related bugs when the review request is closed."

  5. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     

    Missing a docstring (I know the others don't have them--that's older code)

  6. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     

    Missing a docstring (I know the others don't have them--that's older code)

  7. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     

    Missing a docstring.

  8. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     

    Missing a docstring.

  9. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     

    This should refer to commenting on the issue, not editing

  10. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     

    Should "enables" be "enable"?

    On second thought, is this used at all?

    1. No it isn't. It was one of my first attemps to access the values of the new fields. I'll remove it.

  11. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     

    Needs a docstring.

  12. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     

    Needs a docstring.

  13. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     

    "Review Board" should always have a space. We also tend to prefer wrapping the whole thing in parens instead of using the continuation character.

  14. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     

    Docstring should explain what the args/returns are.

  15. reviewboard/hostingsvcs/service.py (Diff revision 2)
     
     
     

    In addition to Review Bot's complaint about line length, r comes before s.

  16. reviewboard/hostingsvcs/service.py (Diff revision 2)
     
     

    Missing a docstring.

  17. reviewboard/hostingsvcs/service.py (Diff revision 2)
     
     
     

    Add a blank line between these two.

  18. reviewboard/hostingsvcs/service.py (Diff revision 2)
     
     

    We should probably create a property in the hosting service that wraps this extra_data access.

  19. reviewboard/hostingsvcs/service.py (Diff revision 2)
     
     

    Add another blank line here.

  20. reviewboard/hostingsvcs/service.py (Diff revision 2)
     
     

    Missing a docstring.

  21. reviewboard/hostingsvcs/service.py (Diff revision 2)
     
     
     

    Add a blank line between these two.

  22. reviewboard/hostingsvcs/service.py (Diff revision 2)
     
     

    We should probably create a property in the hosting service that wraps this extra_data access.

  23. 
      
Review request changed

Commit:

-d34e02768cbc4cd2dfc9e5e6c077563b115e5f23
+a7c49e4a20c12bd22a4d13acace19c86b7b75eb6

Diff:

Revision 3 (+240)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

Review request changed

Summary:

-[WIP] Added a method to post to a Github issue when a ReviewRequest is updated
+[WIP] Added docstrings and post to bug on first reference

Description:

   

Added boolean flags to HostingServices to see whether the repository

    supports posting to a bug tracker when a change is posted, closing a bug
    when a reviw request is closed, or notifying a bug tracker when there's
    new reviews or review requests for the bug.

   
   

Added a couple extra checkboxes to the Github repository form to enable

    these options.

   
   
   
   

Added a new method to HostingService that is called when the

    review_request_closed signal is sent.

   
   

   
   

Added a field to the Private Github repository fields to get the value

    from an extra checkbox to enable the new options for configuring a bug
    tracker.

   
   
   
   

Modified review_request_closed method to close the bug when the Review

    Request is closed if enable_closing_remote_bug is set to True.

   
   

   
   

Added methods to github.py and hostingservices.py to enable sending an

    HTTP Patch request in order to allow closing a Github Issue.

   
   
   
   

Added a method to post to a github issue when a ReviewRequest is

    updated.

  +
  +
  +
  +

Added docstrings and post to bug on first reference

Commit:

-a7c49e4a20c12bd22a4d13acace19c86b7b75eb6
+f1f4d66339a505b6dec4dc90e14ec7901a84aa47

Diff:

Revision 4 (+391)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

Review request changed

Description:

   

Added boolean flags to HostingServices to see whether the repository

    supports posting to a bug tracker when a change is posted, closing a bug
    when a reviw request is closed, or notifying a bug tracker when there's
    new reviews or review requests for the bug.

   
   

Added a couple extra checkboxes to the Github repository form to enable

    these options.

   
   
   
   

Added a new method to HostingService that is called when the

    review_request_closed signal is sent.

   
   

   
   

Added a field to the Private Github repository fields to get the value

    from an extra checkbox to enable the new options for configuring a bug
    tracker.

   
   
   
   

Modified review_request_closed method to close the bug when the Review

    Request is closed if enable_closing_remote_bug is set to True.

   
   

   
   

Added methods to github.py and hostingservices.py to enable sending an

    HTTP Patch request in order to allow closing a Github Issue.

   
   
   
   

Added a method to post to a github issue when a ReviewRequest is

    updated.

   
   
   
~  

Added docstrings and post to bug on first reference

  ~

Added docstrings and post to bug on first reference.

  +
  +

  +
  +
  +
  +

Added a bug tracker form to HostingService.

  + Updated RepositoryForm to use the new Bug tracker form in the Bug tracker section if it exists.

Commit:

-f1f4d66339a505b6dec4dc90e14ec7901a84aa47
+9576897c151d96d8078044e3032f635cc1898dfd

Diff:

Revision 5 (+438 -4)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

Review request changed

Description:

   

Added boolean flags to HostingServices to see whether the repository

    supports posting to a bug tracker when a change is posted, closing a bug
    when a reviw request is closed, or notifying a bug tracker when there's
    new reviews or review requests for the bug.

   
   

Added a couple extra checkboxes to the Github repository form to enable

    these options.

   
   
   
   

Added a new method to HostingService that is called when the

    review_request_closed signal is sent.

   
   

   
   

Added a field to the Private Github repository fields to get the value

    from an extra checkbox to enable the new options for configuring a bug
    tracker.

   
   
   
   

Modified review_request_closed method to close the bug when the Review

    Request is closed if enable_closing_remote_bug is set to True.

   
   

   
   

Added methods to github.py and hostingservices.py to enable sending an

    HTTP Patch request in order to allow closing a Github Issue.

   
   
   
   

Added a method to post to a github issue when a ReviewRequest is

    updated.

   
   
   
   

Added docstrings and post to bug on first reference.

   
   

   
   
   
   

Added a bug tracker form to HostingService.

    Updated RepositoryForm to use the new Bug tracker form in the Bug tracker section if it exists.

  +
  +
  +
  +

Added properties to Repository, and fixed any issues I found.

Commit:

-9576897c151d96d8078044e3032f635cc1898dfd
+d7d59b077cba78e09e60c4ed789fdcdc6d87711e

Diff:

Revision 6 (+498 -4)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

Review request changed

Summary:

-[WIP] Added docstrings and post to bug on first reference
+[WIP] Fixed a bunch of test failures caused by changes made

Description:

   

Added boolean flags to HostingServices to see whether the repository

    supports posting to a bug tracker when a change is posted, closing a bug
    when a reviw request is closed, or notifying a bug tracker when there's
    new reviews or review requests for the bug.

   
   

Added a couple extra checkboxes to the Github repository form to enable

    these options.

   
   
   
   

Added a new method to HostingService that is called when the

    review_request_closed signal is sent.

   
   

   
   

Added a field to the Private Github repository fields to get the value

    from an extra checkbox to enable the new options for configuring a bug
    tracker.

   
   
   
   

Modified review_request_closed method to close the bug when the Review

    Request is closed if enable_closing_remote_bug is set to True.

   
   

   
   

Added methods to github.py and hostingservices.py to enable sending an

    HTTP Patch request in order to allow closing a Github Issue.

   
   
   
   

Added a method to post to a github issue when a ReviewRequest is

    updated.

   
   
   
   

Added docstrings and post to bug on first reference.

   
   

   
   
   
   

Added a bug tracker form to HostingService.

    Updated RepositoryForm to use the new Bug tracker form in the Bug tracker section if it exists.

   
   
   
   

Added properties to Repository, and fixed any issues I found.

  +
  +
  +
  +

Fixed a bunch of test failures caused by changes made.

Commit:

-d7d59b077cba78e09e60c4ed789fdcdc6d87711e
+9e396e93938f978372ac480678f427c6015b0e30

Diff:

Revision 7 (+501 -4)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

Review request changed

Description:

   

Added boolean flags to HostingServices to see whether the repository

    supports posting to a bug tracker when a change is posted, closing a bug
    when a reviw request is closed, or notifying a bug tracker when there's
    new reviews or review requests for the bug.

   
   

Added a couple extra checkboxes to the Github repository form to enable

    these options.

   
   
   
   

Added a new method to HostingService that is called when the

    review_request_closed signal is sent.

   
   

   
   

Added a field to the Private Github repository fields to get the value

    from an extra checkbox to enable the new options for configuring a bug
    tracker.

   
   
   
   

Modified review_request_closed method to close the bug when the Review

    Request is closed if enable_closing_remote_bug is set to True.

   
   

   
   

Added methods to github.py and hostingservices.py to enable sending an

    HTTP Patch request in order to allow closing a Github Issue.

   
   
   
   

Added a method to post to a github issue when a ReviewRequest is

    updated.

   
   
   
   

Added docstrings and post to bug on first reference.

   
   

   
   
   
   

Added a bug tracker form to HostingService.

    Updated RepositoryForm to use the new Bug tracker form in the Bug tracker section if it exists.

   
   
   
   

Added properties to Repository, and fixed any issues I found.

   
   
   
~  

Fixed a bunch of test failures caused by changes made.

  ~

Fixed a bunch of test failures caused by changes made.

  + Fixed Review Bot issues.

Commit:

-9e396e93938f978372ac480678f427c6015b0e30
+02f519019115a982677a661bb9b9d8c8daad30d4

Diff:

Revision 8 (+505 -4)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

  1. 
      
  2. reviewboard/hostingsvcs/github.py (Diff revision 8)
     
     

    Just an empty line in the function docstring.

  3. reviewboard/hostingsvcs/service.py (Diff revision 8)
     
     

    For someone who is unfamiliar with the project, I think it would be useful to add a comment about why the function is not implemented, or a TODO comment if the implementation is expected down the line (or in a separate project).

  4. reviewboard/hostingsvcs/service.py (Diff revision 8)
     
     

    Same comment as above to add a comment or TODO note.

  5. reviewboard/hostingsvcs/service.py (Diff revision 8)
     
     

    I see that after the first and, there is a check for (<expr> and <expr>) or (<expr> and <expr>). For readability, I think it might be useful to extract these booleans into separate variables with meaningful names.

  6. 
      
Review request changed

Summary:

-[WIP] Fixed a bunch of test failures caused by changes made
+[WIP] Deeper Bug Tracker Integrations

Description:

~  

Added boolean flags to HostingServices to see whether the repository

~   supports posting to a bug tracker when a change is posted, closing a bug
~   when a reviw request is closed, or notifying a bug tracker when there's
~   new reviews or review requests for the bug.

~  
~  

Added a couple extra checkboxes to the Github repository form to enable

~   these options.

~  
~  
~  
~  

Added a new method to HostingService that is called when the

~   review_request_closed signal is sent.

~  
  ~

Added options to the Github repository form to enable posting

  ~ to a Github issue when a bug is first mentioned or when a
  ~ review request referencing a bug is updated and closing a
  ~ Github issue when a Review Reques is closed.
  ~ Added properties to Repository for the new bug tracker
  ~ integration options.
  ~ Added new methods to HostingService that are called when the
  ~ review request is closed or updated to take care of these
  ~ deeper bug tracking options.
  ~ Added the ability to post to bug on first reference.
  ~ Added a bug tracker form to HostingService.
  ~ Updated RepositoryForm to use the new bug tracker form in the
  ~ bug tracker section if it exists.

-  

-  
-  

Added a field to the Private Github repository fields to get the value

-   from an extra checkbox to enable the new options for configuring a bug
-   tracker.

-  
-  
-  
-  

Modified review_request_closed method to close the bug when the Review

-   Request is closed if enable_closing_remote_bug is set to True.

-  
-  

-  
-  

Added methods to github.py and hostingservices.py to enable sending an

-   HTTP Patch request in order to allow closing a Github Issue.

-  
-  
-  
-  

Added a method to post to a github issue when a ReviewRequest is

-   updated.

-  
-  
-  
-  

Added docstrings and post to bug on first reference.

-  
-  

-  
-  
-  
-  

Added a bug tracker form to HostingService.

-   Updated RepositoryForm to use the new Bug tracker form in the Bug tracker section if it exists.

-  
-  
-  
-  

Added properties to Repository, and fixed any issues I found.

-  
-  
-  
-  

Fixed a bunch of test failures caused by changes made.

-   Fixed Review Bot issues.

Commit:

-02f519019115a982677a661bb9b9d8c8daad30d4
+419968a97078679c63077231efb5cf48ceb2601a

Diff:

Revision 9 (+512 -4)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

Review request changed

Summary:

-[WIP] Deeper Bug Tracker Integrations
+Deeper Bug Tracker Integrations

Description:

   

Added options to the Github repository form to enable posting

    to a Github issue when a bug is first mentioned or when a
    review request referencing a bug is updated and closing a
~   Github issue when a Review Reques is closed.
  ~ Github issue when a Review Request is closed.
    Added properties to Repository for the new bug tracker
    integration options.
    Added new methods to HostingService that are called when the
    review request is closed or updated to take care of these
    deeper bug tracking options.
    Added the ability to post to bug on first reference.
    Added a bug tracker form to HostingService.
    Updated RepositoryForm to use the new bug tracker form in the
    bug tracker section if it exists.

Testing Done:

  +

Created unit tests in reviewboard.hostingsvcs.tests.test_github.py

  + Tested everything with a private GitHub repo and a local reviewboard instance.

Commit:

-419968a97078679c63077231efb5cf48ceb2601a
+e59c33417f4825a697f4ddb3da41184a5994c9c9

Diff:

Revision 10 (+821 -4)

Show changes

Checks run (2 timed out)

flake8 timed out.
JSHint timed out.
Loading...