MCPcopy Create free account
hub / github.com/decaporg/decap-cms / getFileId

Method getFileId

packages/decap-cms-backend-gitlab/src/API.ts:738–747  ·  view source on GitHub ↗
(path: string, branch: string)

Source from the content-addressed store, hash-verified

736 }
737
738 async getFileId(path: string, branch: string) {
739 const request = await this.request({
740 method: 'HEAD',
741 url: `${this.repoURL}/repository/files/${encodeURIComponent(path)}`,
742 params: { ref: branch },
743 });
744
745 const blobId = request.headers.get('X-Gitlab-Blob-Id') as string;
746 return blobId;
747 }
748
749 async isFileExists(path: string, branch: string) {
750 const fileExists = await this.requestText({

Callers 4

APIClass · 0.95
allEntriesByFolderMethod · 0.80
allEntriesByFolderMethod · 0.80

Calls 2

requestMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected