From 842ea50cbe68bbeb62e9fab08f2717467e4fc53d Mon Sep 17 00:00:00 2001 From: gregfromstl Date: Sat, 2 Nov 2024 01:04:26 +0000 Subject: [PATCH] [Global] Chore: Automate stale issues and PRs (30 days to stale, then 5 days till closing) (#5262) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR adds a GitHub Actions workflow to automatically close stale issues and pull requests after a specified period of inactivity. ### Detailed summary - Introduced a new workflow in `.github/workflows/stale.yml` named 'Close stale issues and PRs'. - Configured the workflow to trigger on a schedule using a cron job. - Set the job to run on `ubuntu-latest`. - Utilized `actions/stale@v9` for managing stale issues and PRs. - Configured messages for stale issues and PRs. - Defined `days-before-stale` as 30 and `days-before-close` as 5. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .github/workflows/stale.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000000..3b5b8914092 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,15 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '30 1 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: 'This issue has been inactive for 30 days. It is now marked as stale and will be closed in 5 days if no further activity occurs.' + stale-pr-message: 'This PR has been inactive for 30 days. It is now marked as stale and will be closed in 5 days if no further activity occurs.' + days-before-stale: 30 + days-before-close: 5