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

Method createPR

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

Source from the content-addressed store, hash-verified

1321 }
1322
1323 async createPR(title: string, head: string) {
1324 const result: Endpoints['POST /repos/{owner}/{repo}/pulls']['response']['data'] =
1325 await this.request(`${this.originRepoURL}/pulls`, {
1326 method: 'POST',
1327 body: JSON.stringify({
1328 title,
1329 body: DEFAULT_PR_BODY,
1330 head: await this.getHeadReference(head),
1331 base: this.branch,
1332 }),
1333 });
1334
1335 return result;
1336 }
1337
1338 async openPR(number: number) {
1339 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