Skip to content

Commit 04ea3b7

Browse files
AmandaCameroneamodio
authored andcommitted
Apply Review Comments.
1 parent 6d7f44e commit 04ea3b7

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/git/remotes/gitlab.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22
import { Range } from 'vscode';
3-
import { GitHubService } from './github';
3+
import { RemoteProvider } from './provider';
44

5-
export class GitLabService extends GitHubService {
5+
export class GitLabService extends RemoteProvider {
66

77
constructor(public domain: string, public path: string, public custom: boolean = false) {
88
super(domain, path);
@@ -12,6 +12,18 @@ export class GitLabService extends GitHubService {
1212
return this.formatName('GitLab');
1313
}
1414

15+
protected getUrlForBranches(): string {
16+
return `${this.baseUrl}/branches`;
17+
}
18+
19+
protected getUrlForBranch(branch: string): string {
20+
return `${this.baseUrl}/commits/${branch}`;
21+
}
22+
23+
protected getUrlForCommit(sha: string): string {
24+
return `${this.baseUrl}/commit/${sha}`;
25+
}
26+
1527
protected getUrlForFile(fileName: string, branch?: string, sha?: string, range?: Range): string {
1628
let line = '';
1729
if (range) {

0 commit comments

Comments
 (0)