From dd1b1f496c6a4bdd394fa5f8665613b719d5c11e Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 17 Aug 2021 12:33:45 -0400 Subject: workflows: Merge close-invalid-bot into stale-issue-bot Signed-off-by: Kevin O'Connor --- .github/workflows/close-invalid-bot.yaml | 33 -------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 .github/workflows/close-invalid-bot.yaml (limited to '.github/workflows/close-invalid-bot.yaml') diff --git a/.github/workflows/close-invalid-bot.yaml b/.github/workflows/close-invalid-bot.yaml deleted file mode 100644 index bec78b4e..00000000 --- a/.github/workflows/close-invalid-bot.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Close issues marked as "not on github" -name: "Close issues marked as 'not on github'" -on: - schedule: - - cron: '0 */6 * * *' -jobs: - close_issues: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v3 - with: - script: | - const issues = await github.issues.listForRepo({ - owner: context.repo.owner, - repo: context.repo.repo, - state: 'open', - labels: 'not on github', - per_page: 100, - page: 1 - }); - const expireMillis = 1000 * 60 * 60 * 36; - const curtime = new Date().getTime(); - for (var issue of issues.data.values()) { - const updatetime = new Date(issue.updated_at).getTime(); - if (curtime < updatetime + expireMillis) - continue; - await github.issues.update({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue.number, - state: 'closed' - }); - } -- cgit v1.2.3-70-g09d2