From 90451883a099d99220e217389511b10cb92dacf2 Mon Sep 17 00:00:00 2001 From: Johann Beleites Date: Fri, 8 Nov 2024 14:25:36 +0100 Subject: [PATCH] SONARJAVA-5168 Add automation to mark and close stale PRs (#4920) --- .github/workflows/mark-prs-stale.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/mark-prs-stale.yml diff --git a/.github/workflows/mark-prs-stale.yml b/.github/workflows/mark-prs-stale.yml new file mode 100644 index 0000000000..d6c6865281 --- /dev/null +++ b/.github/workflows/mark-prs-stale.yml @@ -0,0 +1,20 @@ +name: 'Close stale PRs' +on: + workflow_dispatch: + schedule: + - cron: '30 2 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v9 + with: + stale-pr-message: 'This PR is stale because it has been open 7 days with no activity. If there is no activity in the next 7 days it will be closed automatically' + stale-pr-label: 'stale' + days-before-stale: 7 + days-before-close: 7 + exempt-pr-labels: 'do-not-close,External Contribution'