diff --git a/src/git/remotes/custom.ts b/src/git/remotes/custom.ts index 88e801c616eb2..7d7d68b8e6f38 100644 --- a/src/git/remotes/custom.ts +++ b/src/git/remotes/custom.ts @@ -15,34 +15,34 @@ export class CustomService extends RemoteProvider { } protected getUrlForRepository(): string { - return Strings.interpolate(this.config.custom!.repository, { repo: this.path }); + return Strings.interpolate(this.config.urls!.repository, { repo: this.path }); } protected getUrlForBranches(): string { - return Strings.interpolate(this.config.custom!.branches, { repo: this.path }); + return Strings.interpolate(this.config.urls!.branches, { repo: this.path }); } protected getUrlForBranch(branch: string): string { - return Strings.interpolate(this.config.custom!.branch, { repo: this.path, branch: branch }); + return Strings.interpolate(this.config.urls!.branch, { repo: this.path, branch: branch }); } protected getUrlForCommit(sha: string): string { - return Strings.interpolate(this.config.custom!.commit, { repo: this.path, id: sha }); + return Strings.interpolate(this.config.urls!.commit, { repo: this.path, id: sha }); } protected getUrlForFile(fileName: string, branch?: string, sha?: string, range?: Range): string { let line = ''; if (range) { if (range.start.line === range.end.line) { - line = Strings.interpolate(this.config.custom!.fileLine, { line: range.start.line }); + line = Strings.interpolate(this.config.urls!.fileLine, { line: range.start.line }); } else { - line = Strings.interpolate(this.config.custom!.fileRange, { start: range.start.line, end: range.end.line }); + line = Strings.interpolate(this.config.urls!.fileRange, { start: range.start.line, end: range.end.line }); } } - if (sha) return Strings.interpolate(this.config.custom!.fileInCommit, { repo: this.path, id: sha, file: fileName, line: line }); - if (branch) return Strings.interpolate(this.config.custom!.fileInBranch, { repo: this.path, branch: branch, file: fileName, line: line }); - return Strings.interpolate(this.config.custom!.file, { repo: this.path, file: fileName, line: line }); + if (sha) return Strings.interpolate(this.config.urls!.fileInCommit, { repo: this.path, id: sha, file: fileName, line: line }); + if (branch) return Strings.interpolate(this.config.urls!.fileInBranch, { repo: this.path, branch: branch, file: fileName, line: line }); + return Strings.interpolate(this.config.urls!.file, { repo: this.path, file: fileName, line: line }); } } \ No newline at end of file