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

Method deleteBranch

packages/decap-cms-backend-github/src/API.ts:1345–1356  ·  view source on GitHub ↗
(branchName: string)

Source from the content-addressed store, hash-verified

1343 }
1344
1345 deleteBranch(branchName: string) {
1346 return this.deleteRef('heads', branchName).catch((err: Error) => {
1347 // If the branch doesn't exist, then it has already been deleted -
1348 // deletion should be idempotent, so we can consider this a
1349 // success.
1350 if (err.message === 'Reference does not exist') {
1351 return Promise.resolve();
1352 }
1353 console.error(err);
1354 return Promise.reject(err);
1355 });
1356 }
1357
1358 async getHeadReference(head: string) {
1359 return `${this.repoOwner}:${head}`;

Callers 4

APIClass · 0.95
migrateToVersion1Method · 0.95

Calls 2

deleteRefMethod · 0.95
resolveMethod · 0.80

Tested by

no test coverage detected