From 3d31886fdb0e3d209e383194f525a382b8ece548 Mon Sep 17 00:00:00 2001 From: drivebyer Date: Tue, 17 Sep 2024 13:15:48 +0800 Subject: [PATCH] ci: add stale pr/issue workflow --- .github/workflows/stale.yaml | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/stale.yaml diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml new file mode 100644 index 000000000..92202fa67 --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,56 @@ +# Configuration for stale action workflow - https://github.com/actions/stale +name: Manage stale issues and PRs +on: + schedule: + # Run hourly + - cron: '30 1 * * *' + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v9 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + ascending: true + # --- Issues & PRs --- + # Number of days of inactivity before an issue or PR becomes stale + days-before-stale: 365 + # Number of days of inactivity before a stale issue or PR is closed + days-before-close: 30 + # API calls per run + operations-per-run: 1000 + + # --- Issues --- + stale-issue-label: "stale" + # Comment to post when marking an issue as stale + stale-issue-message: > + This issue has been automatically marked as stale. + **If this issue is still affecting you, please leave any comment** (for example, "bump"), and we'll keep it open. + We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! + # Comment to post when closing a stale issue + close-issue-message: > + Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! + # Issues with these labels will never be considered stale + exempt-issue-labels: "enhancement,good first issue,help wanted" + + # --- PRs --- + stale-pr-label: "stale" + # Comment to post when marking a pull request as stale + stale-pr-message: > + This pull request has been automatically marked as stale. + **If this pull request is still relevant, please leave any comment** (for example, "bump"), and we'll keep it open. + We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated. + # Comment to post when closing a stale pull request + close-pr-message: > + Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you! + # PRs with these labels will never be considered stale + exempt-pr-labels: ""