diff --git a/.github/actions/close-bot/action.yml b/.github/actions/close-bot/action.yml deleted file mode 100644 index dd7eb2beec2f4..0000000000000 --- a/.github/actions/close-bot/action.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: 'Auto Approve' -description: 'Automatically approve/close selected pull requests for shields.io' -branding: - icon: 'check-circle' - color: 'green' -inputs: - github-token: - description: 'The GITHUB_TOKEN secret' - required: true -runs: - using: 'node16' - main: 'index.js' diff --git a/.github/actions/close-bot/helpers.js b/.github/actions/close-bot/helpers.js deleted file mode 100644 index 2f29e7750616a..0000000000000 --- a/.github/actions/close-bot/helpers.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict' - -function findChangelogStart(lines) { - for (let i = 0; i < lines.length; i++) { - const line = lines[i] - if ( - line === 'Changelog' && - lines[i + 2] === '
' - ) { - return i + 3 - } - } - return null -} - -function findChangelogEnd(lines, start) { - for (let i = start; i < lines.length; i++) { - const line = lines[i] - if (line === '
') { - return i - } - } - return null -} - -function allChangelogLinesAreVersionBump(changelogLines) { - return ( - changelogLines.length > 0 && - changelogLines.length === - changelogLines.filter(line => - line.includes('Version bump only for package'), - ).length - ) -} - -function isPointlessVersionBump(body) { - const pointlessBumpLinks = [ - 'https://github.com/typescript-eslint/typescript-eslint', - ] - - const lines = body.split(/\r?\n/) - if (!pointlessBumpLinks.some(link => lines[0].includes(link))) { - return false - } - const start = findChangelogStart(lines) - const end = findChangelogEnd(lines, start) - if (!start || !end) { - return false - } - const changelogLines = lines - .slice(start, end) - .filter(line => !line.startsWith(' !line.startsWith('

All notable changes')) - .filter( - line => - !line.startsWith('See '), - ) - .filter(line => !line.startsWith('