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

Method getMergeRequests

packages/decap-cms-backend-gitlab/src/API.ts:716–733  ·  view source on GitHub ↗
(sourceBranch?: string)

Source from the content-addressed store, hash-verified

714 };
715
716 async getMergeRequests(sourceBranch?: string) {
717 const mergeRequests: GitLabMergeRequest[] = await this.requestJSON({
718 url: `${this.repoURL}/merge_requests`,
719 params: {
720 state: 'opened',
721 labels: 'Any',
722 per_page: 100,
723 target_branch: this.branch,
724 ...(sourceBranch ? { source_branch: sourceBranch } : {}),
725 },
726 });
727
728 return mergeRequests.filter(
729 mr =>
730 mr.source_branch.startsWith(CMS_BRANCH_PREFIX) &&
731 mr.labels.some(l => isCMSLabel(l, this.cmsLabelPrefix)),
732 );
733 }
734
735 async listUnpublishedBranches() {
736 console.log(

Callers 2

getBranchMergeRequestMethod · 0.95

Calls 3

isCMSLabelFunction · 0.90
filterMethod · 0.80
someMethod · 0.80

Tested by

no test coverage detected