aboutsummaryrefslogtreecommitdiff
path: root/labbot/addons/merge-label.py
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2023-03-20 14:03:27 +0100
committerJan200101 <sentrycraft123@gmail.com>2023-03-20 14:03:27 +0100
commit447646d6b8bc93cf27d80581e54f0185cb3f0f35 (patch)
tree6c016bb0028384f463e3b4c1864a253614e43a3a /labbot/addons/merge-label.py
parent3536de674fe296ab93ab16533e3653d0611b2d69 (diff)
downloadlab-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.py7
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: