From acf5bc2417093a45a549caf7da0f3a5c9ef959aa Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 12 Jul 2025 15:06:19 +0200 Subject: [PATCH] workflows/labels: label rebuilds immediately This fixes labeling in the context of the `pull_request` trigger. Of course, this was supposed to immediately label rebuilds after eval finishes, but we somehow lost this along the way. Rebuilds are still labeled fairly soon, because the scheduled trigger will pick up the same PR within 10 minutes again and then apply the rebuild labels. But of course, immediate is better. The reason this happened is, that we're looking at `item.pull_request` only. This is the correct distinction between "issue items" and "pull request items", which we both get back from the /issues endpoint. But the payload for the `pull_request*` event doesn't contain this, so labeling in this case was treated like an issue and skipped the whole pull request part. --- ci/labels/labels.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/labels/labels.cjs b/ci/labels/labels.cjs index 5527059f6e45..809dc4581bb8 100644 --- a/ci/labels/labels.cjs +++ b/ci/labels/labels.cjs @@ -235,7 +235,7 @@ module.exports = async function ({ github, context, core, dry }) { const itemLabels = {} - if (item.pull_request) { + if (item.pull_request || context.payload.pull_request) { stats.prs++ Object.assign(itemLabels, await handlePullRequest(item)) } else {