From a4d3b5f6fbae0d6216c91cfdee302041496a8a8c Mon Sep 17 00:00:00 2001 From: Jens L Date: Tue, 20 Jun 2023 13:50:51 +0200 Subject: [PATCH] ci: replace stale bot with action (#6015) * ci: replace stale bot with action Signed-off-by: Jens Langhammer * run on pr to test? Signed-off-by: Jens Langhammer * don't run on PRs Signed-off-by: Jens Langhammer * remove debug Signed-off-by: Jens Langhammer --------- Signed-off-by: Jens Langhammer --- .github/stale.yml | 19 ------------------ .github/workflows/repo-stale.yml | 33 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 19 deletions(-) delete mode 100644 .github/stale.yml create mode 100644 .github/workflows/repo-stale.yml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index ee67af42a..000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 60 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 7 -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - security - - pr_wanted - - enhancement - - bug/confirmed - - enhancement/confirmed - - question -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. -only: issues diff --git a/.github/workflows/repo-stale.yml b/.github/workflows/repo-stale.yml new file mode 100644 index 000000000..c52997a33 --- /dev/null +++ b/.github/workflows/repo-stale.yml @@ -0,0 +1,33 @@ +name: 'authentik-repo-stale' + +on: + schedule: + - cron: '30 1 * * *' + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - id: generate_token + uses: tibdex/github-app-token@v1 + with: + app_id: ${{ secrets.GH_APP_ID }} + private_key: ${{ secrets.GH_APP_PRIVATE_KEY }} + - uses: actions/stale@v8 + with: + repo-token: ${{ steps.generate_token.outputs.token }} + days-before-stale: 60 + days-before-close: 7 + exempt-issue-labels: pinned,security,pr_wanted,enhancement,bug/confirmed,enhancement/confirmed,question + stale-issue-label: wontfix + stale-issue-message: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. + # Don't stale PRs, so only apply to PRs with a non-existent label + only-pr-labels: foo