From d90a456dfa661d87e820160d2045c73c765564d2 Mon Sep 17 00:00:00 2001 From: Adam Cooke Date: Thu, 22 Feb 2024 00:27:15 +0000 Subject: [PATCH] chore(github-actions): add action to close stale issues and PRs --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/workflows/close.yml | 29 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/close.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 8e67396e..0b37cd05 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: 🐛 Bug report about: Create a report to help us improve Postal and fix issues. title: '' -labels: bug +labels: '' assignees: '' --- diff --git a/.github/workflows/close.yml b/.github/workflows/close.yml new file mode 100644 index 00000000..207ec377 --- /dev/null +++ b/.github/workflows/close.yml @@ -0,0 +1,29 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '30 1 * * *' +permissions: + issues: write + pull-requests: write +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.' + stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.' + close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.' + close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.' + + stale-issue-label: stale + stale-pr-label: stale + + days-before-issue-stale: 30 + days-before-pr-stale: 45 + days-before-issue-close: 5 + days-before-pr-close: 10 + + exempt-all-assignees: true + exempt-all-milestones: true + exempt-issue-labels: bug,enhancement,bug,install,feature