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

Method createPullRequest

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

Source from the content-addressed store, hash-verified

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

Callers 1

editorialWorkflowGitMethod · 0.95

Calls 1

statusToLabelFunction · 0.90

Tested by

no test coverage detected