From 00e7b934fb10ba7a3f57481586da52cc712317df Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 12 Oct 2025 13:40:49 +0200 Subject: [PATCH] workflows/bot: set "merge-bot eligible" label This makes it more visible which PRs are merge-bot eligible, by setting a label respectively. --- ci/github-script/bot.js | 3 ++- ci/github-script/merge.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/github-script/bot.js b/ci/github-script/bot.js index e0a67a747c82..a40b3b227957 100644 --- a/ci/github-script/bot.js +++ b/ci/github-script/bot.js @@ -112,7 +112,7 @@ module.exports = async ({ github, context, core, dry }) => { const maintainers = await getMaintainerMap(pull_request.base.ref) - await handleMerge({ + const merge_bot_eligible = await handleMerge({ github, context, core, @@ -199,6 +199,7 @@ module.exports = async ({ github, context, core, dry }) => { // The second pass will then read the result from the first pass and set the label. '2.status: merge conflict': merge_commit_sha_valid && !pull_request.merge_commit_sha, + '2.status: merge-bot eligible': merge_bot_eligible, '12.approvals: 1': approvals.size === 1, '12.approvals: 2': approvals.size === 2, '12.approvals: 3+': approvals.size >= 3, diff --git a/ci/github-script/merge.js b/ci/github-script/merge.js index 3c7576d659bb..0cb65a11ae97 100644 --- a/ci/github-script/merge.js +++ b/ci/github-script/merge.js @@ -251,6 +251,10 @@ async function handleMerge({ if (canMerge) break } + + // Returns a boolean, which indicates whether the PR is merge-bot eligible in principle. + // This is used to set the respective label in bot.js. + return result } module.exports = {