Skip to content

Commit

Permalink
Apply Review Comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
AmandaCameron authored and eamodio committed Sep 17, 2017
1 parent 6d7f44e commit 04ea3b7
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/git/remotes/gitlab.ts
Original file line number Diff line number Diff line change
@@ -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);
Expand All @@ -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) {
Expand Down

0 comments on commit 04ea3b7

Please sign in to comment.