Skip to content

Commit

Permalink
Fixes bad rename
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Sep 30, 2017
1 parent c09b77e commit 73cc8d2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/git/remotes/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
}

0 comments on commit 73cc8d2

Please sign in to comment.