diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 5990d73a..00000000 --- a/.github/stale.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Stale check -on: - workflow_dispatch: {} - schedule: - - cron: '0 0 * * *' -permissions: - issues: write - pull-requests: write -jobs: - stale: - # only run in prometheus/blackbox_exporter, and don't run this workflow in forks. - if: github.repository == 'prometheus/blackbox_exporter' - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v6.0.1 - with: - close-issue-reason: not_planned - operations-per-run: 100 - days-before-stale: 90 - days-before-close: 30 - stale-issue-message: > - This issue has been automatically marked as stale because it has - not had any activity in the past 90 days. - - The next time this stale check runs, the stale label will be - removed if there is new activity. The issue will be closed after 30 - days if there is no new activity. - - Please apply keepalive label to exempt this Issue. - stale-pr-message: > - This PR has been automatically marked as stale because it has not - had any activity in the past 90 days. - - The next time this stale check runs, the stale label will be - removed if there is new activity. This pull request will be closed in 30 - days if there is no new activity. - - Please apply keepalive label to exempt this Pull Request. - stale-issue-label: stale - stale-pr-label: stale - exempt-issue-labels: keepalive,dependencies,bug - exempt-pr-labels: keepalive,dependencies,bug \ No newline at end of file diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..2b46ca4d --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,31 @@ +name: Stale Check +on: + workflow_dispatch: {} + schedule: + - cron: '16 22 * * *' +permissions: + issues: write + pull-requests: write +jobs: + stale: + if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks. + runs-on: ubuntu-latest + steps: + - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + # opt out of defaults to avoid marking issues as stale and closing them + # https://github.com/actions/stale#days-before-close + # https://github.com/actions/stale#days-before-stale + days-before-stale: -1 + days-before-close: -1 + # Setting it to empty string to skip comments. + # https://github.com/actions/stale#stale-pr-message + # https://github.com/actions/stale#stale-issue-message + stale-pr-message: '' + stale-issue-message: '' + operations-per-run: 30 + # override days-before-stale, for only marking the pull requests as stale + days-before-pr-stale: 60 + stale-pr-label: stale + exempt-pr-labels: keepalive \ No newline at end of file