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

Method deleteUnpublishedEntry

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

Source from the content-addressed store, hash-verified

1219 }
1220
1221 async deleteUnpublishedEntry(collectionName: string, slug: string) {
1222 const contentKey = this.generateContentKey(collectionName, slug);
1223 const branch = branchFromContentKey(contentKey);
1224
1225 const pullRequest = await this.getBranchPullRequest(branch);
1226 if (pullRequest.number !== MOCK_PULL_REQUEST) {
1227 await this.closePR(pullRequest.number);
1228 }
1229 await this.deleteBranch(branch);
1230 }
1231
1232 async publishUnpublishedEntry(collectionName: string, slug: string) {
1233 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