Add web API support for querying remote repositories.

Review Request #5917 — Created June 2, 2014 and submitted

Information

Review Board
master
c17c76e...

Reviewers

This adds a new child resource off the HostingServiceAccount resource
for querying remote repositories.

Since every hosting service works differently, this resource needs to
take different query parameters depending on the hosting service it's
querying. Specifically, the owner-type= and filter-type= values.

Tested this with valid and invalid repositories on GitHub.

Tested different possible values for owner_type and filter_type.

Unit tests pass.

Built docs and saw that they looked correct (though, examples and links
have to be turned off, since we don't have DB-backed state to generate
from).

Description From Last Updated

Should these have any kind of bounds checking?

daviddavid

How about s/against/for/?

daviddavid

"that service"

daviddavid

Get rid of "down"

daviddavid

How about putting this into a mixin class, rather than monkey patching it in?

daviddavid

Should include a comma after this.

daviddavid

This line should have a comma after it.

daviddavid
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/testing/testcase.py
        reviewboard/webapi/resources/remote_repository.py
        reviewboard/webapi/tests/test_remote_repository.py
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/resources/hosting_service_account.py
      Ignored Files:
        docs/manual/webapi/2.0/resources/remote-repository-list.rst
        docs/manual/fixtures/initial_data.json
        docs/manual/webapi/2.0/resources/index.rst
        docs/manual/webapi/2.0/resources/remote-repository.rst
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/testing/testcase.py
        reviewboard/webapi/resources/remote_repository.py
        reviewboard/webapi/tests/test_remote_repository.py
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/resources/hosting_service_account.py
      Ignored Files:
        docs/manual/webapi/2.0/resources/remote-repository-list.rst
        docs/manual/fixtures/initial_data.json
        docs/manual/webapi/2.0/resources/index.rst
        docs/manual/webapi/2.0/resources/remote-repository.rst
    
    
  2. 
      
david
  1. 
      
  2. reviewboard/webapi/resources/remote_repository.py (Diff revision 1)
     
     
     
     
     
     
    Show all issues

    Should these have any kind of bounds checking?

  3. Show all issues

    How about s/against/for/?

  4. Show all issues

    "that service"

  5. Show all issues

    Get rid of "down"

  6. reviewboard/webapi/tests/test_remote_repository.py (Diff revision 1)
     
     
     
     
     
     
     
     
    Show all issues

    How about putting this into a mixin class, rather than monkey patching it in?

    1. Can't :(. The way that the existing mixins work actually prevents this from being mixed in. It's annoying. I've had to do this elsewhere as well.

      The metaclass is mixing in the base test classes. Those end up taking precedence over any mixins we specify when defining the class.

  7. Show all issues

    Should include a comma after this.

  8. Show all issues

    This line should have a comma after it.

  9. 
      
chipx86
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/testing/testcase.py
        reviewboard/webapi/resources/remote_repository.py
        reviewboard/webapi/tests/test_remote_repository.py
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/resources/hosting_service_account.py
      Ignored Files:
        docs/manual/webapi/2.0/resources/remote-repository-list.rst
        docs/manual/fixtures/initial_data.json
        docs/manual/webapi/2.0/resources/index.rst
        docs/manual/webapi/2.0/resources/remote-repository.rst
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/testing/testcase.py
        reviewboard/webapi/resources/remote_repository.py
        reviewboard/webapi/tests/test_remote_repository.py
        reviewboard/webapi/tests/urls.py
        reviewboard/webapi/tests/mimetypes.py
        reviewboard/webapi/resources/hosting_service_account.py
      Ignored Files:
        docs/manual/webapi/2.0/resources/remote-repository-list.rst
        docs/manual/fixtures/initial_data.json
        docs/manual/webapi/2.0/resources/index.rst
        docs/manual/webapi/2.0/resources/remote-repository.rst
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (89ba511)
Loading...