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