Skip to content
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

Update commenter type #1177

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jayudey-wf
Copy link

@jayudey-wf jayudey-wf commented Sep 11, 2024

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.

Related issue:
Add link to the related issue.

Check list:

  • Mark if documentation changes are required. (n/a)
  • Mark if tests were added or updated to cover the changes.

@jayudey-wf jayudey-wf marked this pull request as ready for review September 11, 2024 14:18
@jayudey-wf jayudey-wf requested a review from a team as a code owner September 11, 2024 14:18
@jayudey-wf
Copy link
Author

@MaksimZhukov @jmeridth , sorry for the direct mentions but it looks like you both were some of the last approver's 😰

@jayudey-wf
Copy link
Author

@HarithaVattikuti I noticed that you had reviewed something previously and I didn't know if there were other channels / means to request a review

@jayudey-wf
Copy link
Author

@gowridurgad I noticed you reviewed the last dependabot pr and was wondering if you could take a peak at this?

@@ -1209,7 +1209,7 @@ test('stale issues should not be closed if days is set to -1', async () => {
expect(processor.removedLabelIssues).toHaveLength(0);
});

test('stale label should be removed if a comment was added to a stale issue', async () => {
test('stale label should be removed if a User comment was added to a stale issue', async () => {

Choose a reason for hiding this comment

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

Suggested change
test('stale label should be removed if a User comment was added to a stale issue', async () => {
test('stale label should be removed if a user comment was added to a stale issue', async () => {

@@ -1247,6 +1247,44 @@ test('stale label should be removed if a comment was added to a stale issue', as
expect(processor.removedLabelIssues).toHaveLength(1);
});

test('stale label should not be removed if a Bot comment was added to a stale issue', async () => {

Choose a reason for hiding this comment

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

Suggested change
test('stale label should not be removed if a Bot comment was added to a stale issue', async () => {
test('stale label should not be removed if a bot comment was added to a stale issue', async () => {

@@ -810,7 +810,7 @@ export class IssuesProcessor {

const filteredComments = comments.filter(
comment =>
comment.user?.type === 'User' &&
comment.user?.type !== 'Bot' &&

Choose a reason for hiding this comment

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

Are there supposed to be two equal signs, or just 1?

Copy link
Author

Choose a reason for hiding this comment

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

with typescript i thought it was best to use the triple comparison to avoid any implicit equality comparison

dist/index.js Outdated

Choose a reason for hiding this comment

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

I'm not sure what this change is. Could it be explained a little better?

Copy link
Author

Choose a reason for hiding this comment

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

this was the change i got from running the npm run build from the contributing guide

@aparnajyothi-y
Copy link
Contributor

Hello @jayudey-wf, Thank you for submitting this PR! We will review it and we will get back to you once we have some feedback on this :)

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.

3 participants