-
Notifications
You must be signed in to change notification settings - Fork 407
don't account for bot comments #1309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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', |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there was no pack script locally
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: