Recommended workflow: from issue to merge request

What is the recommended workflow in Gitlab?
Specifically going from an issue to a code commit on master.

Right now, this is my approach but I’m interested in hearing how others are working with Gitlab.

  1. Start with an issue
  2. Create a branch from this issue inside of the web interface
  3. Copy/paste the branch name and pull that branch locally
  4. Edit the code
  5. Commit & Push to gitlab
  6. Create a merge request
  7. Accept the merge request

I find it annoying that I have to create a branch on the web interface, then copy/paste that branch name to pull it locally in Visual Studio Code.
It would also be nice if a Merge Request is made automatically when commiting to that new branch with a commit message like “Closes #XXXX”.

Any suggestions for an improvement to this workflow?

These things are very much a matter of taste. The way I do this is:

  1. Create an issue
  2. Create a merge request in the issue with the Create merge request button
  3. Run git fetch on the command line
  4. git checkout MR-BRANCH-NAME
  5. Edit code, git commit .... etc.
  6. git push MR-BRANCH-NAME
  7. Deal with any pipeline failures…
  8. Assign someone to review the MR
  9. Respond to review issues, etc.
  10. The reviewer accepts and merges, then the issue is automatically closed by GitLab

This may resolve some of your frustrations, but every workflow has merits and problems…

1 Like