diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2023-03-20 14:03:27 +0100 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2023-03-20 14:03:27 +0100 |
commit | 447646d6b8bc93cf27d80581e54f0185cb3f0f35 (patch) | |
tree | 6c016bb0028384f463e3b4c1864a253614e43a3a /labbot/addons/merge-label.py | |
parent | 3536de674fe296ab93ab16533e3653d0611b2d69 (diff) | |
download | lab-bot-447646d6b8bc93cf27d80581e54f0185cb3f0f35.tar.gz lab-bot-447646d6b8bc93cf27d80581e54f0185cb3f0f35.zip |
Independently remove labels before adding them
Diffstat (limited to 'labbot/addons/merge-label.py')
-rw-r--r-- | labbot/addons/merge-label.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/labbot/addons/merge-label.py b/labbot/addons/merge-label.py index 2b6dffa..8be84b3 100644 --- a/labbot/addons/merge-label.py +++ b/labbot/addons/merge-label.py @@ -98,12 +98,15 @@ async def merge_label_hook(event, gl, *args, **kwargs): delete_labels.remove(label) remove_labels = ",".join(delete_labels) - log.debug(f"Applying {label} to {issue}") if remove_labels: log.debug(f"Removing `{remove_labels} from {issue}") + await gl.put(base_url, data={ + "remove_labels": remove_labels, + }) + + log.debug(f"Applying {label} to {issue}") await gl.put(base_url, data={ "add_labels": label, - "remove_labels": remove_labels, }) except KeyError: |