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

Method createPR

packages/decap-cms-backend-github/src/API.ts:1362–1375  ·  view source on GitHub ↗
(title: string, head: string)

Source from the content-addressed store, hash-verified

1360 }
1361
1362 async createPR(title: string, head: string) {
1363 const result: Endpoints['POST /repos/{owner}/{repo}/pulls']['response']['data'] =
1364 await this.request(`${this.originRepoURL}/pulls`, {
1365 method: 'POST',
1366 body: JSON.stringify({
1367 title,
1368 body: DEFAULT_PR_BODY,
1369 head: await this.getHeadReference(head),
1370 base: this.branch,
1371 }),
1372 });
1373
1374 return result;
1375 }
1376
1377 async openPR(number: number) {
1378 console.log('%c Re-opening PR', 'line-height: 30px;text-align: center;font-weight: bold');

Callers 4

migrateToVersion1Method · 0.95

Calls 2

requestMethod · 0.95
getHeadReferenceMethod · 0.95

Tested by

no test coverage detected