(sourceBranch?: string)
| 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( |
no test coverage detected