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

Method deleteUnpublishedEntry

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

Source from the content-addressed store, hash-verified

1194 }
1195
1196 async deleteUnpublishedEntry(collectionName: string, slug: string) {
1197 const contentKey = this.generateContentKey(collectionName, slug);
1198 const branch = branchFromContentKey(contentKey);
1199
1200 const pullRequest = await this.getBranchPullRequest(branch);
1201 if (pullRequest.number !== MOCK_PULL_REQUEST) {
1202 await this.closePR(pullRequest.number);
1203 }
1204 await this.deleteBranch(branch);
1205 }
1206
1207 async publishUnpublishedEntry(collectionName: string, slug: string) {
1208 const contentKey = this.generateContentKey(collectionName, slug);

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected