From 5d4f63d92cd4b7daab1d73952bb021dc0f4356b7 Mon Sep 17 00:00:00 2001 From: Zoran Zorica Date: Tue, 12 Mar 2024 22:36:48 +0100 Subject: [PATCH] chore: add support GHA to clean inactive PRs and issues --- .../workflows/support_stale_and_close.yaml | 25 +++++++++++++++++++ ...yaml => support_update_version_badge.yaml} | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/support_stale_and_close.yaml rename .github/workflows/{update_version_badge.yaml => support_update_version_badge.yaml} (96%) diff --git a/.github/workflows/support_stale_and_close.yaml b/.github/workflows/support_stale_and_close.yaml new file mode 100644 index 0000000..11729ef --- /dev/null +++ b/.github/workflows/support_stale_and_close.yaml @@ -0,0 +1,25 @@ +name: '[Support] Stale-And-Close Inactive Issues And PRs' +on: + workflow_dispatch: + schedule: + - cron: '0 1 * * *' +# Remove all permissions by default. Actions are performed by Daytona Bot +permissions: {} + +jobs: + stale: + runs-on: ubuntu-latest + steps: + # This step will add the stale comment and label for the first 15 days without activity. It won't close any task + - uses: actions/stale@v5 + with: + stale-issue-message: 'This Issue has been automatically marked as "stale" because it has not had recent activity (for 14 days). It will be closed if no further activity occurs. Thanks for the feedback.' + stale-pr-message: 'This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 14 days). It will be closed if no further activity occurs. Thank you for your contribution.' + close-issue-message: 'Due to the lack of activity in the last 7 days since it was marked as "stale", we are closing this Issue. Do not hesitate to reopen it later if necessary.' + close-pr-message: 'Due to the lack of activity in the last 7 days since it was marked as "stale", we are closing this Pull Request. Do not hesitate to reopen it later if necessary.' + days-before-stale: 14 + days-before-close: 7 + exempt-issue-labels: 'on-hold' + exempt-pr-labels: 'on-hold' + operations-per-run: 100 + repo-token: ${{ secrets.GITHUBBOT_TOKEN }} diff --git a/.github/workflows/update_version_badge.yaml b/.github/workflows/support_update_version_badge.yaml similarity index 96% rename from .github/workflows/update_version_badge.yaml rename to .github/workflows/support_update_version_badge.yaml index 4db8e88..0bae331 100644 --- a/.github/workflows/update_version_badge.yaml +++ b/.github/workflows/support_update_version_badge.yaml @@ -1,4 +1,4 @@ -name: Update Version Badge +name: '[Support] Update Version Badge' on: workflow_dispatch: