• 
      

    Fix authentication, post-commit, and Unicode issues with GitLab.

    Review Request #8194 — Created May 29, 2016 and submitted

    Information

    Review Board
    release-2.0.x

    Reviewers

    There have been a few major issues reported around GitLab repositories
    and account linkage. The biggest issue is that, as of the latest
    versions of Review Board (with custom auth forms for hosting services),
    it wasn't possible anymore to link a GitLab repository. This was due to
    a bad assertion in the new code that was ensuring that a hosting URL
    wasn't provided if two-factor auth wasn't available, but that should
    have checked the hosting URL against whether the service allows hosting
    URLs.
    
    Another issue was that the New Review Request page didn't actually
    allow for posting commits. It had hard-coded gitlab.com, instead of
    using the specified GitLab server address, meaning that unless you were
    trying to use gitlab.com, it was impossible to post existing commits for
    review.
    
    The third is that we were treating diff data as Unicode, which would
    break on some files. We now treat them as binary data.

    Unit tests pass.

    Tested account linking against a GitLab Enterprise server, and tested
    browsing and posting commits (including ones with Unicode) for review.

    Description From Last Updated

    This will end up with https://gitlab.com//

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

      This will end up with https://gitlab.com//

    3. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (e384976)