From 285959054426bed893275b28cd1d3468ed775e28 Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Sun, 26 Oct 2025 16:46:42 +0100 Subject: [PATCH] update workflows (#5131) --- .github/workflows/issue_lock.yml | 52 -------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 .github/workflows/issue_lock.yml diff --git a/.github/workflows/issue_lock.yml b/.github/workflows/issue_lock.yml deleted file mode 100644 index b1235b0a..00000000 --- a/.github/workflows/issue_lock.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: issue_lock - -on: - schedule: - - cron: '40 15 * * *' - workflow_dispatch: - -jobs: - issue_lock: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/github-script@v8 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const { repo: { owner, repo } } = context; - - const now = new Date(); - - for await (const res of github.paginate.iterator( - github.rest.issues.listForRepo, { - owner, - repo, - state: 'closed', - })) { - for (const issue of res.data) { - if (issue.locked) { - continue; - } - - if ((now - new Date(issue.closed_at)) < 1000*60*60*24*31*6) { - continue; - } - - if (!issue.pull_request) { - await github.rest.issues.createComment({ - owner, - repo, - issue_number: issue.number, - body: 'This issue is being locked automatically because it has been closed for more than 6 months.\n' - + 'Please open a new issue in case you encounter a similar problem.', - }); - } - - github.rest.issues.lock({ - owner, - repo, - issue_number: issue.number, - }); - } - }