瀏覽代碼

[fix] Fix Azure DevOps link formats

main
Lee Chang 3 年之前
committed by Eric Amodio
父節點
當前提交
0e156c9a06
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      src/git/remotes/azure-devops.ts

+ 3
- 3
src/git/remotes/azure-devops.ts 查看文件

@ -132,15 +132,15 @@ export class AzureDevOpsRemote extends RemoteProvider {
let line;
if (range != null) {
if (range.start.line === range.end.line) {
line = `&line=${range.start.line}`;
line = `&line=${range.start.line}&lineStartColumn=${range.start.character + 1}&lineEndColumn=${range.end.character + 1}`;
} else {
line = `&line=${range.start.line}&lineEnd=${range.end.line}`;
line = `&line=${range.start.line}&lineEnd=${range.end.line}&lineStartColumn=${range.start.character + 1}&lineEndColumn=${range.end.character + 1}`;
}
} else {
line = '';
}
if (sha) return this.encodeUrl(`${this.baseUrl}/commit/${sha}/?_a=contents&path=/${fileName}${line}`);
if (sha) return this.encodeUrl(`${this.baseUrl}?path=${fileName}&version=GC${sha}${line}&_a=contents`);
if (branch) return this.encodeUrl(`${this.baseUrl}/?path=/${fileName}&version=GB${branch}&_a=contents${line}`);
return this.encodeUrl(`${this.baseUrl}?path=/${fileName}${line}`);
}

Loading…
取消
儲存