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

Method getMergeRequests

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

Source from the content-addressed store, hash-verified

705 };
706
707 async getMergeRequests(sourceBranch?: string) {
708 const mergeRequests: GitLabMergeRequest[] = await this.requestJSON({
709 url: `${this.repoURL}/merge_requests`,
710 params: {
711 state: 'opened',
712 labels: 'Any',
713 per_page: 100,
714 target_branch: this.branch,
715 ...(sourceBranch ? { source_branch: sourceBranch } : {}),
716 },
717 });
718
719 return mergeRequests.filter(
720 mr =>
721 mr.source_branch.startsWith(CMS_BRANCH_PREFIX) &&
722 mr.labels.some(l => isCMSLabel(l, this.cmsLabelPrefix)),
723 );
724 }
725
726 async listUnpublishedBranches() {
727 console.log(

Callers 2

getBranchMergeRequestMethod · 0.95

Calls 3

isCMSLabelFunction · 0.90
filterMethod · 0.80
someMethod · 0.80

Tested by

no test coverage detected