From 55aea3b57dca0a1e226003f07f8e3ab97ada4961 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Fri, 21 Jul 2023 08:37:30 +0200 Subject: Abort Merge Request creation when any relevant Merge Request was found --- labbot/addons/merge-stable.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'labbot') diff --git a/labbot/addons/merge-stable.py b/labbot/addons/merge-stable.py index 493887f..1a2904f 100644 --- a/labbot/addons/merge-stable.py +++ b/labbot/addons/merge-stable.py @@ -51,8 +51,9 @@ async def issue_update_hook(event, gl, *args, **kwargs): "source_branch": branch, "target_branch": config["stable_branch"] }): - if merge_data["state"] == "opened": - merge_exists = True + # We have found a merge request, we cannot sanely re-merge again. + merge_exists = True + break if merge_exists: log.debug(f"merge for `{branch}` already exists") -- cgit v1.2.3