From 42f7ce90cbf320ce47b7a14d2418545368204c31 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Thu, 15 Feb 2024 09:31:16 +0100 Subject: check if issue is open before opening stable merge request --- labbot/addons/merge-stable.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'labbot') diff --git a/labbot/addons/merge-stable.py b/labbot/addons/merge-stable.py index 8e4eff6..9b2f133 100644 --- a/labbot/addons/merge-stable.py +++ b/labbot/addons/merge-stable.py @@ -23,6 +23,9 @@ async def issue_update_hook(event, gl, *args, **kwargs): issue_url = f"/projects/{event.project_id}/issues/{issue_id}" issue_data = await gl.getitem(issue_url) + if issue_data["state"] != "opened": + log.debug(f"{issue_id} is closed, not opening merge request") + return branches = {} if config["merge_label"] in issue_data["labels"]: -- cgit v1.2.3