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

Method isFileExists

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

Source from the content-addressed store, hash-verified

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

Callers 1

getCommitItemsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected