From 5fc2150d280db6a4381d7dc873bc30303bf51ba9 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Mon, 9 Nov 2026 16:38:16 +0100 Subject: [PATCH] Backbot: Skip runs for merged PRs without backport labels Previously, the job ran on every merged PR when the `closed` event fired, whether or not any `backport-to-support/*` label was set. Since we switched to `comment_style: summary`, each of these runs posts a summary comment on the original PR even though there's nothing to backport, which adds noise to every merged PR. Only run the job if the PR has at least one label starting with `backport-to-support/`. The label names are serialized with `toJSON()`, and the search string includes the opening quote so it only matches at the start of a label name. On `labeled` events, still require that the newly added label is a backport label, so adding unrelated labels later doesn't start another run. --- .github/workflows/backbot.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backbot.yml b/.github/workflows/backbot.yml index b216b2a4d04..81b62132ff4 100644 --- a/.github/workflows/backbot.yml +++ b/.github/workflows/backbot.yml @@ -13,7 +13,8 @@ jobs: runs-on: ubuntu-latest if: | github.repository_owner == 'Icinga' && - github.event.pull_request.merged == true && ( + github.event.pull_request.merged == true && + contains(toJSON(github.event.pull_request.labels.*.name), '"backport-to-support/') && ( github.event.action != 'labeled' || startsWith(github.event.label.name, 'backport-to-support/') )