Giter Site home page Giter Site logo

Comments (5)

jcpetruzza avatar jcpetruzza commented on July 1, 2024

Ok, some minor clarifications:

  • In GitLab, if the title of the merge request starts with "WIP", then the MR is considered work-in-progress and it is not possible to merge it (neither using the Merge button nor the REST Api) until this is resolved by editing the title and removing the "WIP" part. I.e., you don't need to rename your branch to resolve this.
  • GitLab also added a feature where if the branch you use to create the merge request starts with wip_, then it marks the merge request as work-in-progress, which you resolve, again removing the WIP from the title. The same will happen if you push a fixup commit.
  • At the moment, when marge picks a merge request to process, it first checks if it is marked as WIP by gitlab and in that case it bails out immediately leaving a message about it. The rationale is that you don't want to wait until CI passes to find out that you can't merge the branch.
  • So, from the point of view of marge the name of the branch is irrelevant, the only thing that matters is whether the merge request that was assigned to her is currently marked as WIP or not.

We could make it so that, when ran with a certain flag, marge will simply edit the title to remove the WIP tag and then just merge the request. It would be a relatively simple fix. But I wonder if this would be a sane setting: the WIP is a protection that is there in order to prevent someone to merge a branch that the author thought was not ready. Developers opt-in to this feature by prefixing their branches with wip_ or by putting WIP on the title of their MR. If one were to run marge with this flag, individual developers could no longer opt to use it, since marge will just ignore.

However, I wonder if the annoying bit here is that a long time may happen between you assign the request to marge and you get the notification saying "can't merge, the branch is WIP", since other requests may have to be merged before this happens. And, again, once you react, you need to wait until your branch gets to be merged again. So maybe having marge continuously polling branches assigned to her and unassigning herself immediately in case the branch is WIP would be a good enough behaviour? What do you think?

from marge-bot.

trickl avatar trickl commented on July 1, 2024

from marge-bot.

jcpetruzza avatar jcpetruzza commented on July 1, 2024

I think you are correct... partly.

If the branch is called foo_bar_1234 and contains more than one commit, then gitlab will suggest foo bar 1234 as title for the merge request. Then you get as a not-sure-if-intended side effect that if your branch was called wip_foo_bar_1234, then the proposed title will be wip foo bar 1234 and if you just press "Create", your merge request will be marked as WIP (since the title starts with wip). It is true though that gitlab will automatically mark the MR as WIP if you later push additional fixup commits.

The association between branch name and merge request
title is solely due to Marge.

This part is definitely not the case. Marge has nothing to do with the creation of merge requests, that's all vanilla gitlab functionality. Everything that happens before you assign Marge's user to a merge request is outside of her domain.

from marge-bot.

trickl avatar trickl commented on July 1, 2024

from marge-bot.

jcpetruzza avatar jcpetruzza commented on July 1, 2024

I'm closing this issue in favour of #69 which I think would solve the issue with a better UX. Feel free to reopen!

from marge-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.