• 
      

    Support more than 100 Gitlab hosted repos

    Review Request #6037 — Created June 30, 2014 and submitted

    Information

    Review Board
    release-2.0.x
    f3c89c6...

    Reviewers

    Newer gitlab versions do provide pagination support via a header.
    See https://github.com/gitlabhq/gitlabhq/commit/0678b8a4 Gitlab v6.8.0+

    Add a new method that follows the "next" rel if present in the link
    header, and use this to fetch all repositories.

    Tested on a gitlab 6.8.X deployment against a developer reviewboard. Was able to add a repository that's beyond the first 100 repos.

    Description From Last Updated

    Can we reword this without a string of semicolons? Maybe: Follows the "next" rel .... This requires at least GitLab …

    chipx86 chipx86

    No blank line.

    chipx86 chipx86

    Blank line after this.

    chipx86 chipx86

    Instead of duplicating all this, I'd suggest doing what we did in github.py on master where api_get can return headers, …

    chipx86 chipx86

    Blank line on either side of this.

    chipx86 chipx86

    Can we make constants for this string and its length?

    chipx86 chipx86

    And blank line before this.

    chipx86 chipx86
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/hostingsvcs/gitlab.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/hostingsvcs/gitlab.py
      
      
    2. 
        
    chipx86
    1. 
        
    2. reviewboard/hostingsvcs/gitlab.py (Diff revision 1)
       
       
       
       
      Show all issues

      Can we reword this without a string of semicolons? Maybe:

      Follows the "next" rel .... This requires at least GitLab v6.8.0, and will provide only the first page on earlier versions.
      
    3. reviewboard/hostingsvcs/gitlab.py (Diff revision 1)
       
       
       
       
      Show all issues

      No blank line.

    4. reviewboard/hostingsvcs/gitlab.py (Diff revision 1)
       
       
      Show all issues

      Blank line after this.

    5. reviewboard/hostingsvcs/gitlab.py (Diff revision 1)
       
       
       
       
       
       
       
       
       
       
       
       
       
       
      Show all issues

      Instead of duplicating all this, I'd suggest doing what we did in github.py on master where api_get can return headers, and then api_get_list just makes use of api_get.

    6. reviewboard/hostingsvcs/gitlab.py (Diff revision 1)
       
       
      Show all issues

      Blank line on either side of this.

    7. reviewboard/hostingsvcs/gitlab.py (Diff revision 1)
       
       
       
      Show all issues

      Can we make constants for this string and its length?

    8. reviewboard/hostingsvcs/gitlab.py (Diff revision 1)
       
       
      Show all issues

      And blank line before this.

    9. 
        
    david
    1. I'll make the desired changes and push this. Thanks!

      1. Thanks, I appreciate it a lot! I just hadn't gotten around to looking at the feedback of how github.py implemented api_get() yet to refactor mine.

        Mind tagging me on the review when you make the changes? I'm just interested to how you'd like it changed :-).

      2. I didn't put it up for review, but you can see the resulting change here: https://github.com/reviewboard/reviewboard/commit/dd3bbd768990ed52b543f647199d81387be823ce

    2. 
        
    TG
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (dd3bbd7)