Kaizen Today I Learned by Ville Säävuori

Optimal Workflow For GitLab Merge Requests

I’ve been working a lot with GitLab Merge Requests lately and stumbled by accident to a workflow that makes creating and working with MRs easy.

When you have a ticket that relates to the MR, name your repo starting with the ticket number: 42-figure-out-life

Now push the branch empty branh. GitLab project page suggests you to open a MR (and if the repo has configured it, the MR link also shows in the Git log as well). This creates a MR that has the ticket automatically referenced and the MR is marked as draft.

Next just clean up the title to something a bit more human readable and add any details to the body (while keeping the link reference there) and you’re done. When the MR is merged, the ticket is closed automatically (no need for any special commit messages) and the MR is also linked to all related Milestones as well.

Tagged with ,

Published . Last modified .