Apply Review Comments.

This commit is contained in:
Amanda Cameron
2017-09-17 10:05:17 -04:00
committed by Eric Amodio
parent 6d7f44e091
commit 04ea3b7971

View File

@@ -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) {