Questions tagged [merge-request]

114 questions
3
votes
0 answers

How Can We Check All Checkbox Are Checked in Gitlab Merge Request Template

Gitlab has a merge request template, and we can add a checklist to this merge request template. I want to enable the merge icon if all checks are completed. The completed task's number is shown on the merge request page. Gitlab doesn't support this…
3
votes
1 answer

How to check out merge request branch in GitLab coming from fork you don't have access to?

I'm trying to learn about merge requests and in particular how those work in GitLab. Given a project MAIN by user USER_MAIN (role: Maintainer) another user USER_OTHER has been invited to join (role: Developer). USER_OTHER creates a fork FORK of…
rbaleksandar
  • 8,713
  • 7
  • 76
  • 161
3
votes
1 answer

GitLab-CI: Why does a Merge Results pipeline build an unchanged result twice?

I'm trialing the "Ultimate" version of GitLab, in particular the Merge Results Pipeline feature, along with the related Merge Trains feature. I have Merge Results pipeline & Merge Trains enabled for my project, Merge Method is set to Merge Commit,…
davidA
  • 12,528
  • 9
  • 64
  • 96
3
votes
1 answer

How to add issue ID from branch name to merge request description template?

By default GitLab adds issue ID from branch name to the merge request description, see Merge requests to close issues: Merge requests to close issues To create a merge request to close an issue when it’s merged, you can either: Add a note in the…
dur
  • 15,689
  • 25
  • 79
  • 125
3
votes
0 answers

gitlab ci trigger pipeline after updating labels in merge request

If I created the MR with the bug label, it will trigger the label script; If I created the MR without the label, it will not trigger; even if I add the label later on the MR view, the CI will not trigger the script as well. Is it possible to do…
user3906723
  • 117
  • 2
  • 15
2
votes
0 answers

Pushing a branch for a merge request that was checked out locally via merge request ID

I am handling merge requests in Gitlab and I am facing merge conflicts. I want to merge locally and I am using the gitlab manual and tips to do so (see screenshot), but I fail to understand how I can push my locally merged and solved branch back to…
2
votes
0 answers

How to have two approvals by the same user in gitlab merge request approvals? (GitLab)

We have created two user groups to accept merges request. The group "Testing" and "Code review". Some users are in both groups. Our merges request need two approvals to be merged. We would like a user who is in the "Testing" group and in the "Code…
xxT3
  • 57
  • 6
2
votes
1 answer

how to make sure gitlab MR contains unit testcase or not

I want to enforce that each GitLab MR should contain unit test case(s). how to make sure GitLab MR contains unit test case or not Thank you!
kani
  • 61
  • 7
2
votes
1 answer

Run gitlab pipeline only for commits

Currently gitlab runs a pipeline when creating a merge request + branch with the GUI. Is it possible to skip this pipeline, since it's only repeats the last pipeline from the default branch? We tried with: workflow: rules: - if:…
elsamuko
  • 668
  • 6
  • 16
2
votes
1 answer

Bitbucket Repository Hook: create PullRequest with source and targetBranch in Java

I want to develop a hook that will automatically merge a branch (always the same one) into the master when smth happens. This should happen because there are some strange diffs when pull requests are opened and we found out that this merging is the…
dinkelbrot
  • 31
  • 3
2
votes
2 answers

How to add label when merge request is created on gitlab?

I would like to add label "foo" once merge request is created. How can I do it? If not possible via gitlab gui (using some robot) it is possible via gitlab api?
nirebam368
  • 245
  • 4
  • 11
2
votes
3 answers

How to create a merge request from an already pushed commit from CLI?

I have a branch called dev which is up-to-date with the origin/dev. I want to merge into the (protected) master with the following command, but it doesn't push either create the merge request. $ git push -o merge_request.create -o…
betontalpfa
  • 3,454
  • 1
  • 33
  • 65
2
votes
1 answer

Differences github merge "pull-request" and gitlab merge "merge-request"

For a better understanding of these operations I would like to know how exactly github or gitlab are merging these requests. Which git commands are executed in detail, when squashing, rebasing, merging,...?
ÐerÆndi
  • 139
  • 10
1
vote
1 answer

How to completely stop autodevops pipeline in gitlab 15.7.0?

Whenever i try to merge requests the pipeline automatically runs and gets stuck, this makes the merge request unable to approv. I tried disabling the Auto Devops, but this doesn't seem to be working as expected.
Ameeyr
  • 11
  • 2
1
vote
1 answer

Git command to get id's of opened merge requests

refs/merge-requests/*/head return all list of merge request (merged & opened) is it possible to get id's of opened requests only? without gitlab cli all merge requests: 1, 2, 3, 4, 5 closed: 1, 2, 3 git terminal command return only: 4, 5