Loading .github/workflows/bot.yml +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ name: Bot on: schedule: - cron: '07,17,27,37,47,57 * * * *' - cron: '05,15,25,35,45,55 * * * *' workflow_call: inputs: headBranch: Loading ci/github-script/merge.js +7 −3 Original line number Diff line number Diff line Loading @@ -36,7 +36,9 @@ function runChecklist({ // bad code between the approval and the merge. commit_id === pull_request.head.sha, ) .map(({ user }) => user.id), .map(({ user }) => user?.id) // Some users have been deleted, so filter these out. .filter(Boolean), ) const checklist = { Loading Loading @@ -160,12 +162,14 @@ async function handleMerge({ ) const comments = events.slice(lastPush + 1).filter( ({ event, body, node_id }) => ({ event, body, user, node_id }) => ['commented', 'reviewed'].includes(event) && hasMergeCommand(body) && // Ignore comments where the user has been deleted already. user && // Ignore comments which had already been responded to by the bot. !events.some( ({ event, user, body }) => ({ event, body }) => ['commented'].includes(event) && // We're only testing this hidden reference, but not the author of the comment. // We'll just assume that nobody creates comments with this marker on purpose. Loading Loading
.github/workflows/bot.yml +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ name: Bot on: schedule: - cron: '07,17,27,37,47,57 * * * *' - cron: '05,15,25,35,45,55 * * * *' workflow_call: inputs: headBranch: Loading
ci/github-script/merge.js +7 −3 Original line number Diff line number Diff line Loading @@ -36,7 +36,9 @@ function runChecklist({ // bad code between the approval and the merge. commit_id === pull_request.head.sha, ) .map(({ user }) => user.id), .map(({ user }) => user?.id) // Some users have been deleted, so filter these out. .filter(Boolean), ) const checklist = { Loading Loading @@ -160,12 +162,14 @@ async function handleMerge({ ) const comments = events.slice(lastPush + 1).filter( ({ event, body, node_id }) => ({ event, body, user, node_id }) => ['commented', 'reviewed'].includes(event) && hasMergeCommand(body) && // Ignore comments where the user has been deleted already. user && // Ignore comments which had already been responded to by the bot. !events.some( ({ event, user, body }) => ({ event, body }) => ['commented'].includes(event) && // We're only testing this hidden reference, but not the author of the comment. // We'll just assume that nobody creates comments with this marker on purpose. Loading