• 
      

    Add support for GitLab API v4

    Review Request #9383 — Created Dec. 13, 2017 and submitted — Latest diff uploaded

    Information

    Review Board
    release-2.5.x
    a44bb26...

    Reviewers

    This patch adds support for GitLab API v4 while maintaining backwards
    compatability with v3. When we don't know the API version of the host,
    we will determine it by optimistically assuming v4 and then falling back
    to v3.

    Additionally, we no longer use the user's password to retrieve an API
    token from GitLab. Newer versions (9+) remove the /session API and
    require users to generate a token per application in their profile
    settings. We now accept this API token directly with instructions how to
    create it on new and old versions of GitLab.

    Some other minor changes were made:

    • We now log full stack traces from unexpected Exceptions in the
      Repository Form
    • We now have commit summaries for post commit review for older versions
      of GitLab that don't include the entire commit message
    • Support for nested groups in newer versions of GitLab
    • Linked a gitlab.com nested group repository (e.g. group foo/bar, repo
      baz) and was able to do post-commit review.
    • Linked a GitLab 7 group and user repository and was able to do
      post-commit review for both.
    • Ran unit tests.