Skip to content

Commit 024844d

Browse files
ricardogsilvaRicardo Garcia Silva
andauthored
Add stalebot config (#1582)
* Added initial stale bot CI workflow * Added initial stale bot CI workflow * Added permissions and exempt label to stale action * Tweaked stale bot workflow file --------- Co-authored-by: Ricardo Garcia Silva <ricardo@kartoza.com>
1 parent 1e42417 commit 024844d

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: 'Close stale Issues and Pull Requests'
2+
3+
env:
4+
STALE_AFTER_INACTIVE_DAYS: 90
5+
CLOSE_AFTER_INACTIVE_DAYS: 7
6+
7+
on:
8+
schedule:
9+
- cron: '1 3 * * 0' # runs every Sunday at 03h01 UTC
10+
11+
jobs:
12+
stale:
13+
permissions:
14+
issues: write
15+
pull-requests: write
16+
if: github.repository == 'geopython/pygeoapi'
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: 'actions/stale@v9'
20+
with:
21+
debug-only: true
22+
enable-statistics: true
23+
stale-issue-label: stale
24+
stale-pr-label: stale
25+
exempt-issue-labels: blocker
26+
exempt-pr-labels: blocker
27+
days-before-stale: ${{ env.STALE_AFTER_INACTIVE_DAYS }}
28+
days-before-close: ${{ env.CLOSE_AFTER_INACTIVE_DAYS }}
29+
remove-stale-when-updated: true
30+
stale-issue-message: >
31+
As per [RFC4](https://pygeoapi.io/development/rfc/4), this Issue has
32+
been inactive for ${{env.STALE_AFTER_INACTIVE_DAYS }} days. In order
33+
to manage maintenance burden, it will be automatically closed
34+
in ${{ env.CLOSE_AFTER_INACTIVE_DAYS }} days.
35+
stale-pr-message: >
36+
As per [RFC4](https://pygeoapi.io/development/rfc/4), this Pull Request
37+
has been inactive for ${{env.STALE_AFTER_INACTIVE_DAYS }} days. In order
38+
to manage maintenance burden, it will be automatically closed
39+
in ${{ env.CLOSE_AFTER_INACTIVE_DAYS }} days.
40+
close-issue-message: >
41+
As per [RFC4](https://pygeoapi.io/development/rfc/4), this Issue has
42+
been closed due to there being no activity for more
43+
than ${{ env.STALE_AFTER_INACTIVE_DAYS }} days.
44+
close-pr-message: >
45+
As per [RFC4](https://pygeoapi.io/development/rfc/4), this Pull Request
46+
has been closed due to there being no activity for more
47+
than ${{ env.STALE_AFTER_INACTIVE_DAYS }} days.

0 commit comments

Comments
 (0)