MCPcopy
hub / github.com/iterative/cml / prCreate

Method prCreate

src/drivers/github.js:423–452  ·  view source on GitHub ↗
(opts = {})

Source from the content-addressed store, hash-verified

421 }
422
423 async prCreate(opts = {}) {
424 const {
425 source: head,
426 target: base,
427 title,
428 description: body,
429 autoMerge
430 } = opts;
431 const { owner, repo } = ownerRepo({ uri: this.repo });
432 const { pulls } = octokit(this.token, this.repo);
433
434 const {
435 data: { html_url: htmlUrl, number }
436 } = await pulls.create({
437 owner,
438 repo,
439 head,
440 base,
441 title,
442 body
443 });
444
445 if (autoMerge)
446 await this.prAutoMerge({
447 pullRequestId: number,
448 mergeMode: autoMerge,
449 base
450 });
451 return htmlUrl;
452 }
453
454 /**
455 * @param {{ branch: string }} opts

Callers

nothing calls this directly

Calls 3

prAutoMergeMethod · 0.95
ownerRepoFunction · 0.85
octokitFunction · 0.85

Tested by

no test coverage detected