-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds automated handling of inactive issues/PRs (dry-run)
- Loading branch information
1 parent
77689e2
commit b893177
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Perform automated repository maintenance | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 */2 * * *" | ||
|
||
jobs: | ||
cleanup-inactive: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
env: | ||
inactive_days: 90 | ||
closing_days: 10 | ||
total_days: 100 | ||
inactive_label: "no-activity" | ||
closed_label: "auto-closed" | ||
steps: | ||
- name: Cleanup inactive issues/PRs | ||
- uses: actions/stale@v9 | ||
with: | ||
days-before-stale: ${{ env.inactive_days }} | ||
days-before-close: ${{ env.close_days }} | ||
stale-issue-label: ${{ env.inactive_label }} | ||
close-issue-label: ${{ env.closed_label }} | ||
exempt-issue-labels: "needs-review,planned,in-progress" | ||
stale-issue-message: "Hi there! Unfortunately, this Issue has not seen any activity for at least ${{ env.inactive_days }} days. If the Issue is still relevant to the [latest version of Zappa](https://github.com/zappa/Zappa/releases/latest), please comment within the next ${{ env.closing_days }} days if you wish to keep it open. Otherwise, it will be automatically closed." | ||
close-issue-message: "Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least ${{ env.total_days }} days. If the Issue is still relevant to the [latest version of Zappa](https://github.com/zappa/Zappa/releases/latest), please [open a new Issue](https://github.com/zappa/Zappa/issues/new)." | ||
stale-pr-label: ${{ env.inactive_label }} | ||
close-pr-label: ${{ env.closed_label }} | ||
exempt-pr-labels: "needs-review" | ||
stale-pr-message: "Hi there! Unfortunately, this PR has not seen any activity for at least ${{ env.inactive_days }} days. If the PR is still relevant to the [latest version of Zappa](https://github.com/zappa/Zappa/releases/latest), please comment within the next ${{ env.closing_days }} days if you wish to keep it open. Otherwise, it will be automatically closed." | ||
close-pr-message: "Hi there! Unfortunately, this PR was automatically closed as it had not seen any activity in at least ${{ env.total_days }} days. If the PR is still relevant to the [latest version of Zappa](https://github.com/zappa/Zappa/releases/latest), please [open a new PR](https://github.com/zappa/Zappa/compare)." | ||
labels-to-add-when-unstale: "needs-review" | ||
ascending: true | ||
enable-statistics: true | ||
# DEBUG OPTIONS | ||
debug-only: true | ||
operations-per-run: 1000 |