vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Closes #1236 - Add GitLab API support

Open kpaxton opened this issue 3 years ago • 2 comments

  • Add GitLab api-v4 support
  • Add Personal Token authorization for GitLab Remotes
  • Add IgnoreCertErrors remote config param for allowing invalid certs
  • Add node-fetch for non-graphql APIs

Description

This PR should add initial support for GitLab remote APIs. GraphQL support is not extensive in the version I was working against (12.6) so this uses their standard REST API v4. It should be compatible with 12.6+ as I was working off docs for the current gitlab.com (v13.7).

Adds support for Personal Token authorization for GitLab Remote APIs. Token is stored in globalState. (follows pattern set by GitLab extension)

Adds ignoreCertErrors to remotes settings to allow for invalid certificates to not be rejected. Uses a custom Agent passed to node-fetch to accomplish this.

Checklist

  • [x] I have followed the guidelines in the Contributing document
  • [x] My changes follow the coding style of this project
  • [x] My changes build without any errors or warnings
  • [x] My changes have been formatted and linted
  • [x] My changes include any required corresponding changes to the documentation
  • [x] My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • [x] My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

kpaxton avatar Dec 17 '20 18:12 kpaxton

Hey @eamodio Did you ever take a look at this?

kpaxton avatar Apr 12 '21 12:04 kpaxton

Updated based off of latest main branch. Changed how we get the project based on updated v13+ api changes in GitLab. Tested using v13.4.4-ee.

kpaxton avatar Apr 12 '21 16:04 kpaxton