-
由 Will Chen 提交于
## Summary - Adds a new daily GitHub Actions workflow (`draft-stale-prs.yml`) that automatically converts open PRs to draft state when there has been no activity for 7 days - Checks four activity signals: last commit push, issue comments, review comments, and reopen events - Leaves a comment explaining why the PR was converted to draft ## Test plan - [ ] Trigger the workflow manually via `workflow_dispatch` and verify it runs without errors - [ ] Verify it skips PRs that are already in draft state - [ ] Verify it correctly identifies stale PRs with no activity in 7 days
🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2586" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end --> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > CI/workflow-only change that affects PR state and adds comments; main risk is unintended drafting due to activity detection edge cases or API/rate-limit behavior. > > **Overview** > Adds a new scheduled/manual GitHub Actions workflow (`draft-stale-prs.yml`) that scans open PRs and converts *non-draft* PRs to draft when there has been no activity for 7+ days. > > The workflow computes “last activity” from the latest commit, non-bot issue comments, review comments, review submissions, and `reopened`/`ready_for_review` timeline events, then posts an explanatory comment after converting; it also caps processing to 30 PRs and aborts on rate-limit/permission errors. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c9fc2ae9527e48f4ab4452ce0f2ecb2c0eb5f2fa. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by:Claude Opus 4.6 <noreply@anthropic.com>