Skip to content

Conversation

@jayudey-wf
Copy link

@jayudey-wf jayudey-wf commented Dec 4, 2025

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:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@jayudey-wf jayudey-wf marked this pull request as ready for review December 4, 2025 19:35
@jayudey-wf jayudey-wf requested a review from a team as a code owner December 4, 2025 19:35
Copilot AI review requested due to automatic review settings December 4, 2025 19:35
Copy link
Contributor

Copilot AI left a 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',
Copy link

Copilot AI Dec 4, 2025

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'.

Suggested change
'An issue that should un-stale',
'An issue that should remain stale',

Copilot uses AI. Check for mistakes.
Build the typescript and package it for distribution.

```bash
$ npm run build && npm run pack
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant