Skip to content

Commit 420020c

Browse files
author
guqiankun
committed
chore: 更新gitlink静态资源获取
1 parent 32fb98e commit 420020c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

packages/code-api/src/gitlink/gitlink.service.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,10 @@ export class GitLinkAPIService implements ICodeAPIService {
9898
return `${repo.owner}/${repo.name}`;
9999
}
100100

101-
// TODO 静态资源路径 gitlink 静态资源好像无法用commit获取
102101
transformStaticResource(repo: IRepositoryModel, path: string) {
103-
return `${this.config.origin}/repo/${this.getProjectPath(repo)}/raw/branch/${
102+
return `${this.config.origin}/api/${this.getProjectPath(repo)}/raw?ref=${
104103
repo.commit
105-
}/${path}`;
104+
}&filepath=${path}`;
106105
}
107106

108107
protected async request<T>(path: string, options?: RequestOptions): Promise<T> {

0 commit comments

Comments
 (0)