jenkinsci / jenkinsci/gitlab-plugin

How to pull only one merge-request/ branch

Open
#1,040 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
1.4k
Forks
615
Avg merge
4h 32m
Merged PRs (30d)
10

Description

I'm configuring MergeRequest build with **Build when a change is pushed to GitLab**. according to [docs](https://github.com/jenkinsci/gitlab-plugin#freestyle-jobs)

> In the Advanced settings, set Name to origin and Refspec to +refs/heads/*:refs/remotes/origin/* +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*

But this results in ALL merge-request/* branches being fetched, which in my case takes a lot of time as there are thousands of them. But really there is a need for only two, namely **master** and my **merge-request/42** branches. So my question is how can I change the Refspec to pull only these branches instead of all? Or any other change I can make to speed up the process.

Thank you in advance!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.