From 04ea3b797153c66c23edad60ce4d57223ed98095 Mon Sep 17 00:00:00 2001 From: Amanda Cameron Date: Sun, 17 Sep 2017 10:05:17 -0400 Subject: [PATCH] Apply Review Comments. --- src/git/remotes/gitlab.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/git/remotes/gitlab.ts b/src/git/remotes/gitlab.ts index 76486e1..a7efa11 100644 --- a/src/git/remotes/gitlab.ts +++ b/src/git/remotes/gitlab.ts @@ -1,8 +1,8 @@ 'use strict'; import { Range } from 'vscode'; -import { GitHubService } from './github'; +import { RemoteProvider } from './provider'; -export class GitLabService extends GitHubService { +export class GitLabService extends RemoteProvider { constructor(public domain: string, public path: string, public custom: boolean = false) { super(domain, path); @@ -12,6 +12,18 @@ export class GitLabService extends GitHubService { return this.formatName('GitLab'); } + protected getUrlForBranches(): string { + return `${this.baseUrl}/branches`; + } + + protected getUrlForBranch(branch: string): string { + return `${this.baseUrl}/commits/${branch}`; + } + + protected getUrlForCommit(sha: string): string { + return `${this.baseUrl}/commit/${sha}`; + } + protected getUrlForFile(fileName: string, branch?: string, sha?: string, range?: Range): string { let line = ''; if (range) {