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

Method deleteUnpublishedEntry

packages/decap-cms-backend-github/src/API.ts:1234–1243  ·  view source on GitHub ↗
(collectionName: string, slug: string)

Source from the content-addressed store, hash-verified

1232 }
1233
1234 async deleteUnpublishedEntry(collectionName: string, slug: string) {
1235 const contentKey = this.generateContentKey(collectionName, slug);
1236 const branch = branchFromContentKey(contentKey);
1237
1238 const pullRequest = await this.getBranchPullRequest(branch);
1239 if (pullRequest.number !== MOCK_PULL_REQUEST) {
1240 await this.closePR(pullRequest.number);
1241 }
1242 await this.deleteBranch(branch);
1243 }
1244
1245 async publishUnpublishedEntry(collectionName: string, slug: string) {
1246 const contentKey = this.generateContentKey(collectionName, slug);

Callers 1

Calls 5

generateContentKeyMethod · 0.95
getBranchPullRequestMethod · 0.95
closePRMethod · 0.95
deleteBranchMethod · 0.95
branchFromContentKeyFunction · 0.90

Tested by

no test coverage detected