-
Notifications
You must be signed in to change notification settings - Fork 55
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
Exclude bot's comment from "Time to first response" #121
Conversation
Split function to avoid "too complex" error when executing lint.
Added that the issue author's own comments and comments by bots are excluded.
# ignore comments by IGNORE_USERS | ||
comment_user.login in ignore_users | ||
# ignore comments by bots | ||
or comment_user.type == "Bot" |
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.
Were you able to test this one out? I was worried by the documentations description:
A string representing the type of User account this. In all cases should be “User”
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 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.
I have not read the documentation, but I have confirmed that a "bot" is returned when the API is called.
For example.
% gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/users/codesee-maps\[bot\]
{
"login": "codesee-maps[bot]",
...
"type": "Bot",
...
}
As a side note, I hope the api documentation clearly states this. However, the Examples only mentions "User".
https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-a-user
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.
Thanks for the contribution @eichisanden and especially for splitting this out to a separate function!
I'll publish a new release tomorrow so this gets deployed to folks. |
Proposed Changes
Exclude bot's comment from "Time to first response".
I believe that bots in GitHub actions often respond faster than users, so it's hard to imagine a use case where measuring the time it takes for a bot to respond would be useful.
Readiness Checklist
Author/Contributor
make lint
and fix any issues that you have introducedmake test
and ensure you have test coverage for the lines you are introducingbug
,documentation
,enhancement
,infrastructure
, orbreaking