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

Method createPR

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

Source from the content-addressed store, hash-verified

1347 }
1348
1349 async createPR(title: string, head: string) {
1350 const result: Endpoints['POST /repos/{owner}/{repo}/pulls']['response']['data'] =
1351 await this.request(`${this.originRepoURL}/pulls`, {
1352 method: 'POST',
1353 body: JSON.stringify({
1354 title,
1355 body: DEFAULT_PR_BODY,
1356 head: await this.getHeadReference(head),
1357 base: this.branch,
1358 }),
1359 });
1360
1361 return result;
1362 }
1363
1364 async openPR(number: number) {
1365 console.log('%c Re-opening PR', 'line-height: 30px;text-align: center;font-weight: bold');

Callers 3

migrateToVersion1Method · 0.95

Calls 2

requestMethod · 0.95
getHeadReferenceMethod · 0.95

Tested by

no test coverage detected