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

Method isFileExists

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

Source from the content-addressed store, hash-verified

614 }
615
616 async isFileExists(path: string, branch: string) {
617 try {
618 await this.requestText({
619 url: `${this.endpointUrl}/items/`,
620 params: { version: branch, path },
621 cache: 'no-store',
622 });
623 return true;
624 } catch (error) {
625 if (error instanceof APIError && error.status === 404) {
626 return false;
627 }
628 throw error;
629 }
630 }
631
632 async createPullRequest(branch: string, commitMessage: string, status: string) {
633 const pr = {

Callers 1

getCommitItemsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected