From 22ad11e9429e64d4bc096d1039330a872e1ea15f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= <765740+giordano@users.noreply.github.com> Date: Sun, 8 Dec 2024 20:28:29 +0000 Subject: [PATCH] [AutoMerge] Do not add "blocked" label if already there (#582) --- Project.toml | 2 +- src/AutoMerge/cron.jl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index e30ca1c2..e9929221 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "RegistryCI" uuid = "0c95cc5f-2f7e-43fe-82dd-79dbcba86b32" authors = ["Dilum Aluthge ", "Fredrik Ekre ", "contributors"] -version = "10.9.0" +version = "10.9.1" [deps] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" diff --git a/src/AutoMerge/cron.jl b/src/AutoMerge/cron.jl index cb6b7ced..6d23a91a 100644 --- a/src/AutoMerge/cron.jl +++ b/src/AutoMerge/cron.jl @@ -313,9 +313,9 @@ function cron_or_api_build( # of the other steps (e.g. automerge passing, waiting period, etc). blocked = pr_has_blocking_comments(api, registry, pr; auth=auth) && !has_label(pr.labels, OVERRIDE_BLOCKS_LABEL) if blocked - if !read_only - # add `BLOCKED_LABEL` to communicate to users - # that the PR is blocked from automerging + if !read_only && !has_label(pr.labels, BLOCKED_LABEL) + # add `BLOCKED_LABEL` to communicate to users that the PR is blocked + # from automerging, unless the label is already there. GitHub.add_labels(api, registry.full_name, pr_number, [BLOCKED_LABEL]; auth=auth) end @info(