[][src]Module gitlab_butler_lib::merge_requests

Manage ready to merge GitLab MRs

If in your project you prefer a semi-linear history, and you have a queue of MRs that are ready to be merged, you may and up fighting for the merge and rebasing more than once each branch (the problem is more evident if the project has a lengthy pipeline to wait).

This bot automate a workflow that emerged in our team:

  1. Developer A work on some feature
  2. Once done, assign the MR to developer B for the review
  3. Instead of merging (or rebasing) developer B adds a ~"Merge Ready" label
  4. The TL manages the merge queue (doing a second review on the code)

Waiting for this bot to exist, we ended up finding the second review valuable, so we modified the bot to wait for both the ~"Merge Ready" label and the TL emoji of choice.

The new workflow is very like the one above, with a different ending:

  1. Developer A work on some feature
  2. Once done, assign the MR to developer B for the review
  3. Instead of merging (or rebasing) developer B adds a ~"Merge Ready" label
  4. The TL does a second review on the code, and adds an :octopus: emoji
  5. gitlab-butler loops and picks the first rebased MR or triggers a rebase

Enums

MergeResult

Functions

mergebot
try_to_merge

Try to merge the given MR, optionally rebasing and waiting for pipeline completition.