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

Method createPullRequest

packages/decap-cms-backend-azure/src/API.ts:632–653  ·  view source on GitHub ↗
(branch: string, commitMessage: string, status: string)

Source from the content-addressed store, hash-verified

630 }
631
632 async createPullRequest(branch: string, commitMessage: string, status: string) {
633 const pr = {
634 sourceRefName: this.branchToRef(branch),
635 targetRefName: this.branchToRef(this.branch),
636 title: commitMessage,
637 description: DEFAULT_PR_BODY,
638 labels: [
639 {
640 name: statusToLabel(status, this.cmsLabelPrefix),
641 },
642 ],
643 };
644
645 await this.requestJSON({
646 method: 'POST',
647 url: `${this.endpointUrl}/pullrequests`,
648 params: {
649 supportsIterations: false,
650 },
651 body: JSON.stringify(pr),
652 });
653 }
654
655 async getBranchPullRequest(branch: string) {
656 const pullRequests = await this.getPullRequests(branch);

Callers 1

editorialWorkflowGitMethod · 0.95

Calls 1

statusToLabelFunction · 0.90

Tested by

no test coverage detected