Skip to content

Mark MR as WIP when pushing WIP commits

Jurre requested to merge jurre/gitlab-ce:wip-mr-from-commits into master

What does this MR do?

It marks a merge request as WIP when you push commits to it that begin with wip: , squash! or fixup!. It does this by updating the MR's title to WIP: .., if it's not already marked as such.

Are there points in the code the reviewer needs to double check?

I have implemented work_in_progress? on Commit, to match MergeRequest, however a case could be made for just inlining this in the RefreshService, as the functionality is not used elsewhere and the functionality is kind of specific to this use case.

The tests for this rely on a wip branch existing that has at least one commit in it that matches the WIP rules for a commit (wip:, squash!, fixup!), so they will fail here.

Also, I'm sure that the test for the RefreshService could be cleaned up a bit, I'd love some pointers on that.

Screenshots (if relevant)

Screen_Shot_2016-12-14_at_16.15.49

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #25036 (closed)

Merge request reports