mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-09 16:18:34 +01:00
workflows/bot: set "merge-bot eligible" label
This makes it more visible which PRs are merge-bot eligible, by setting a label respectively.
This commit is contained in:
parent
ba3293a128
commit
00e7b934fb
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue