From 46e656af5045c16da3fa58dc8efc5811063fd2ab Mon Sep 17 00:00:00 2001 From: Simon Chabot Date: Mon, 19 Oct 2020 11:31:48 +0200 Subject: [PATCH] fix: double check that an MR is not wip before assigning it seems that filtering in the search is not enough, and some MR may be wip, even when the 'wip="no"' parameter is given. Let' skip WIP merge requests --- assignbot/__main__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assignbot/__main__.py b/assignbot/__main__.py index c07f8a4..5b2ce55 100644 --- a/assignbot/__main__.py +++ b/assignbot/__main__.py @@ -162,6 +162,12 @@ class ReviewAssigner: shuffle(merge_requests) for merge_request in merge_requests: + if merge_request.work_in_progress: + # double check that the MR is not WIP. + # it seems that filtering in the search parameters is not enough + # XXX is it a Gitlab bug ? + continue + project = self.cnx.projects.get(merge_request.project_id) if CLIENT_PROJECT_TAG in project.tag_list: # it's a client project. Let's assume that someone will take -- GitLab