Change the API for get_remote_repositories().

Review Request #5903 — Created May 29, 2014 and submitted

Information

Review Board
master
36034e5...

Reviewers

get_remote_repositories()'s API was using plan IDs as a way of
identifying users vs. organizations, which led to some redundancy.
For example, "private" and "public" for GitHub meant the same thing
(users). GitHub in particular was assuming certain filter types for
repositories, which would be handy to specify from a caller's point of
view.

The function has now been changed to remove the plan parameter and to
instead have a dedicated "owner_type" parameter that specifies what
"owner" refers to. The value is dependent on the hosting service, and
HostingService subclasses are expected to be smart about the defaults.

It also now takes a "filter_type" parameter that allows for filtering
repositories. Possible values are dependent on the hosting service as
well. For instance, GitHub's allowed values consist of what their API
natively allows for their "type=" parameter in repository queries.

Unit tests pass.

Tested with my upcoming web API change, testing user and org lookups
and various filters.

Description From Last Updated

Col: 29 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 29 E128 continuation line under-indented for visual indent

reviewbotreviewbot
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/hostingsvcs/github.py
        reviewboard/hostingsvcs/tests.py
        reviewboard/hostingsvcs/service.py
      Ignored Files:
    
    
  2. reviewboard/hostingsvcs/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 29
     E128 continuation line under-indented for visual indent
    
  3. reviewboard/hostingsvcs/tests.py (Diff revision 1)
     
     
    Show all issues
    Col: 29
     E128 continuation line under-indented for visual indent
    
  4. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/hostingsvcs/github.py
        reviewboard/hostingsvcs/tests.py
        reviewboard/hostingsvcs/service.py
      Ignored Files:
    
    
  2. 
      
chipx86
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/hostingsvcs/github.py
        reviewboard/hostingsvcs/tests.py
        reviewboard/hostingsvcs/service.py
      Ignored Files:
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/hostingsvcs/github.py
        reviewboard/hostingsvcs/tests.py
        reviewboard/hostingsvcs/service.py
      Ignored Files:
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (cdd2080)