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.
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.
There was a problem hiding this comment.
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
zkoppert
left a comment
There was a problem hiding this comment.
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 lintand fix any issues that you have introducedmake testand ensure you have test coverage for the lines you are introducingbug,documentation,enhancement,infrastructure, orbreaking