Skip to content

Commit

Permalink
Monitor, mark and close issues and PRs with github workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Fatih Türken <turkenf@gmail.com>
  • Loading branch information
turkenf committed Apr 2, 2024
1 parent d6a52c4 commit fe35ec2
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Stale Issues and PRs
on:
schedule:
# Process new stale issues once a day. Folks can use /fresh for a fast un-stale
# per the commands workflow. Run at 3:15 mostly as a somewhat unique time to
# help correlate any issues with this workflow.
- cron: '15 3 * * *'
workflow_dispatch: {}

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-22.04
steps:
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9
with:
# This action uses ~2 operations per stale issue per run to determine
# whether it's still stale. It also uses 2-3 operations to mark an issue
# stale or not. During steady state (no issues to mark stale, check, or
# close) we seem to use less than 10 operations with ~200 issues and PRs
# open.
#
# Our hourly rate-limit budget for all workflows that use GITHUB_TOKEN
# is 1,000 requests per the below docs.
# https://docs.github.com/en/rest/overview/resources-in-the-rest-api#requests-from-github-actions
operations-per-run: 100
# For issues: post a "warning" message after 360 days, then close if another 30 days pass without a response.
days-before-issue-stale: 360
days-before-issue-close: 30
stale-issue-label: stale
exempt-issue-labels: exempt-from-stale
stale-issue-message: >
To encourage issues not to rot, we automatically mark those with
no activity in the last 360 days as stale. It will be closed in 30
days if no further activity occurs. Leaving a comment
**starting with** `/fresh` will mark this issue as not stale.
close-issue-message: >
I'm closing this issue because we haven't heard back in 30 days. ⌛️
If you still need help, feel free to comment or reopen the issue!
# For PRs: post a "warning" message after 90 days, then close if another 14 days pass without a response.
days-before-pr-stale: 90
days-before-pr-close: 14
stale-pr-label: stale
exempt-pr-labels: exempt-from-stale
stale-pr-message: >
To encourage PRs not to rot, we automatically mark those with
no activity in the last 90 days as stale. It will be closed in 14
days if no further activity occurs. Leaving a comment
**starting with** `/fresh` will mark this PR as not stale.
close-pr-message: >
I'm closing this pull request because we haven't heard back in
90 days. ⌛️ If you're still working on this, feel free to reopen
the PR or create a new one!

0 comments on commit fe35ec2

Please sign in to comment.