Skip to content

feat(github-actions): add stale draft PR action#3602

Open
thePunderWoman wants to merge 1 commit intoangular:mainfrom
thePunderWoman:stale-drafts
Open

feat(github-actions): add stale draft PR action#3602
thePunderWoman wants to merge 1 commit intoangular:mainfrom
thePunderWoman:stale-drafts

Conversation

@thePunderWoman
Copy link
Copy Markdown
Contributor

@thePunderWoman thePunderWoman commented Apr 13, 2026

This adds a new behavior to the lock-closed local-action. It automatically closes draft PRs with no activity from the PR author over the past 4 weeks. This was created based on a policy conversation amongst the team members.

@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Apr 13, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the closeStaleDraftPrs function to automatically close draft pull requests that have been inactive for 28 days. The review feedback suggests optimizing the search query by sorting by update date to avoid processing the same active PRs repeatedly, reducing API calls by checking the PR's updated_at timestamp before performing detailed activity checks, and increasing the pagination limit when fetching comments to ensure author activity is not missed.

Comment thread .github/local-actions/lock-closed/lib/main.ts Outdated
Comment thread .github/local-actions/lock-closed/lib/main.ts Outdated
Comment thread .github/local-actions/lock-closed/lib/main.ts Outdated
Comment thread .github/local-actions/lock-closed/lib/main.ts Outdated
Comment thread .github/local-actions/lock-closed/lib/main.ts Outdated
Comment thread .github/local-actions/lock-closed/lib/main.ts Outdated
Comment thread .github/local-actions/lock-closed/lib/main.ts Outdated
Comment thread .github/local-actions/lock-closed/lib/main.ts Outdated
Comment thread github-actions/stale-cleanup/lib/main.ts Outdated
Comment thread github-actions/stale-cleanup/lib/main.ts Outdated
Comment thread github-actions/stale-cleanup/package.json Outdated
Comment thread github-actions/stale-cleanup/lib/main.ts Outdated
Comment thread github-actions/stale-cleanup/lib/main.ts Outdated
Comment thread github-actions/stale-cleanup/lib/main.ts Outdated
Comment thread github-actions/stale-cleanup/lib/main.ts Outdated
@thePunderWoman thePunderWoman force-pushed the stale-drafts branch 4 times, most recently from b869e16 to 31a2dcd Compare April 14, 2026 15:53
Comment thread github-actions/stale-cleanup/lib/main.spec.ts Outdated
Comment thread github-actions/stale-cleanup/lib/main.ts Outdated
Comment thread github-actions/stale-cleanup/lib/main.ts Outdated
Comment thread .github/local-actions/stale-cleanup/lib/main.ts
Comment thread github-actions/stale-cleanup/lib/main.ts Outdated
Comment thread github-actions/stale-cleanup/lib/main.ts Outdated
Comment thread github-actions/stale-cleanup/action.yml Outdated
Comment thread .prettierignore Outdated
Copy link
Copy Markdown
Contributor

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for this. Just one comment

Copy link
Copy Markdown
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This adds a new behavior to the lock-closed local-action. It automatically closes draft PRs with no activity from the PR author over the past 4 weeks.
@thePunderWoman thePunderWoman added the action: merge The PR is ready for merge by the caretaker label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants