|
| 1 | +name: PR Stale Check |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '0 0 * * 1' # Every Monday at midnight UTC |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +jobs: |
| 9 | + check-stale: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + permissions: |
| 12 | + contents: read |
| 13 | + issues: read |
| 14 | + pull-requests: write |
| 15 | + id-token: write |
| 16 | + steps: |
| 17 | + - uses: anthropics/claude-code-action@v1 |
| 18 | + with: |
| 19 | + anthropic_api_key: ${{ secrets.CLAUDE_CODE_ANTHROPIC_API_KEY }} |
| 20 | + prompt: | |
| 21 | + EXEMPT USERS: @maxprilutskiy, @vrcprl, @davidturnbull, @monicabe, @sumitsaurabh927, @AleksandrSl |
| 22 | +
|
| 23 | + Check all open pull requests and for each PR: |
| 24 | +
|
| 25 | + 1. Analyze the conversation to determine: |
| 26 | + - Are there unaddressed comments/requests from maintainers? |
| 27 | + - Has the PR author responded or made updates recently? |
| 28 | + - Is the ball in the author's court or are they waiting on maintainers? |
| 29 | + - Has a stale reminder been posted already (look for "still working on this" or similar language in bot comments)? |
| 30 | +
|
| 31 | + 2. Decision logic: |
| 32 | + - If author is waiting on maintainers: SKIP |
| 33 | + - If author responded recently (within 7 days): SKIP |
| 34 | + - If PR author is in exempt users list: SKIP |
| 35 | + - If there are unaddressed maintainer comments AND: |
| 36 | + - No stale reminder posted yet: POST REMINDER |
| 37 | + - Stale reminder was posted >7 days ago with no response: CLOSE PR |
| 38 | +
|
| 39 | + 3. Reminder message template (friendly, concise, no emojis): |
| 40 | + "Hey @author! Just checking in - are you still working on this PR? We noticed there are some comments that may need addressing. If you need more time, no problem! Just let us know. If we don't hear back within a week, we'll close this to keep the repo tidy, but you can always reopen when ready." |
| 41 | +
|
| 42 | + 4. Close message template (friendly, concise, no emojis): |
| 43 | + "Closing this PR as stale to keep the repo clean. Feel free to reopen or create a new PR once you're ready to continue. Thanks for your contribution!" |
| 44 | + claude_args: "--max-turns 10" |
0 commit comments