Skip to content

Commit ac670cc

Browse files
committed
feat: Add Gitlab Blame endpoint to the RespositoryFiles API
See https://docs.gitlab.com/ee/api/repository_files.html#get-file-blame-from-repository for docs closes: #409
1 parent d9207f3 commit ac670cc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/services/RepositoryFiles.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ class RepositoryFiles extends BaseService {
6363
});
6464
}
6565

66+
showBlame(projectId: ProjectId, filePath: string, options?: Sudo) {
67+
const [pId, path] = [projectId, filePath].map(encodeURIComponent);
68+
69+
return RequestHelper.get(this, `projects/${pId}/repository/files/${path}/blame`, options);
70+
}
71+
6672
showRaw(projectId: ProjectId, filePath: string, ref: string, options?: Sudo) {
6773
const [pId, path] = [projectId, filePath].map(encodeURIComponent);
6874

0 commit comments

Comments
 (0)