Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the stale issue processing logic where bot comments were incorrectly being counted as user activity, preventing stale issues from being properly closed. The change updates the comment filter to exclude bot comments rather than only including user comments, ensuring that only genuine user activity prevents stale issue closure.
Key Changes
- Modified comment filtering logic to exclude bot comments instead of only including user types
- Added test coverage to verify bot comments don't prevent stale issue closure
- Updated existing test to correctly reflect bot user type
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/classes/issues-processor.ts | Changed comment filter from checking type === 'User' to type !== 'Bot' to exclude bot comments |
| tests/main.spec.ts | Added new test case for bot comment behavior and corrected existing test's user type |
| CONTRIBUTING.md | Removed npm run pack from build command |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| generateIssue( | ||
| opts, | ||
| 1, | ||
| 'An issue that should un-stale', |
There was a problem hiding this comment.
The test description 'An issue that should un-stale' contradicts the test's purpose, which is to verify that bot comments do NOT cause issues to un-stale. Consider renaming to 'An issue that should remain stale'.
| 'An issue that should un-stale', | |
| 'An issue that should remain stale', |
| Build the typescript and package it for distribution. | ||
|
|
||
| ```bash | ||
| $ npm run build && npm run pack |
There was a problem hiding this comment.
there was no pack script locally
|
just also ran into this isse, I have PR that also keep flip-flopping. |

Description:
I was noticing that several of the places where I had instrumented the stale action it seemed like some of the pr's were having the label's appropriately applied but the action was never coming back around and closing them after the determined stale period.
I ran a small version of this as part of a small script and saw that the output indicated that the github actions comment was a 'Bot' type.
I had previously created this change set here, #1177 but given all the changes i thought to just start a new.
Related issue:
Add link to the related issue.
Check list: