Closing items while paginating can skip open pull requests
@v-chiranjib-swain is already working on this.
Since Aug 18, 2026.
- #1369 by @v-chiranjib-swain — open
Assessment
This issue has not been assessed yet.
Description
Description:
Closing stale pull requests while traversing numbered pages of open items can cause later items to be skipped. IssuesProcessor.processIssues() fetches a 100-item page, processes and potentially closes those items, and then requests page + 1 from the now-smaller state: open result set. If enough items are closed, the offset for the next page can move past unprocessed items or return an empty page.
We observed a run process 200 pull requests, close 104 of them, consume 627 of its configured 1,000 operations, and then report No more issues found to process. Exiting.... An older eligible pull request had no entry in the log. The repository had more than 200 open pull requests at the start of the run, so the action had not traversed the complete initial set.
The current v11 source appears to retain the same numbered-page traversal in src/classes/issues-processor.ts.
Action version:
v9 for the observed run. The traversal pattern also appears present in v11.0.0, but we have not reproduced the run on v11 yet.
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Repro steps:
-
Create a repository with more than 200 open pull requests, with over 100 eligible for immediate stale closure.
-
Configure the action with a sufficiently high operation budget and immediate closure, for example:
- uses: actions/stale@v9 with: days-before-pr-stale: 30 days-before-pr-close: 0 operations-per-run: 1000 days-before-issue-stale: -1 days-before-issue-close: -1 -
Run the action and inspect the final statistics and per-PR log entries.
-
Compare the processed PRs with the open PRs present when the run began.
Expected behavior:
The action should continue until it has inspected every item in the initial open result set or until the operation budget is exhausted. If the budget is exhausted, continuation state should preserve progress for the next run.
Actual behavior:
The action stopped after two 100-item pages and 627 operations, reported that no more items existed, and reset its continuation state even though older open pull requests had not been inspected.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 438
- Avg merge
- 27d 8h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from actions/stale
-
Stale label remains after pushing a new commitPossibly taken @v-chiranjib-swain claimed this 21 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
Ignore issues which has linked open PRsPossibly taken A pull request linked to this issue is open or already merged. Openfeature request
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
feature request
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
feature request
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
solidjs/solid-docs#1716 ·
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Progress indicated by console logs is off by onePossibly taken @marceliwac claimed this today. Openbug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
aws-samples/aws-cdk-examples#1336 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
melgarafael/DeskcommCRM#4999 · 1 comment ·
Maintainers usually reply within 1 day
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days