-
Notifications
You must be signed in to change notification settings - Fork 78
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
Better tracking when candidates for PR assignment are filtered out #1895
Better tracking when candidates for PR assignment are filtered out #1895
Conversation
@@ -508,7 +510,10 @@ pub(super) async fn handle_command( | |||
{ | |||
// This is a comment, so there must already be a reviewer assigned. No need to assign anyone else. | |||
issue | |||
.post_comment(&ctx.github, &on_vacation_msg(&username)) |
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 deletion of on_vacation_msg
is in 82c549a (sorry)
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 find the functions better than the consts, because with the function you cannot forget to pass the required placeholders, with the static string you can easily just use it without replacing the placeholder.
// return Err(FindReviewerError::AllReviewersFiltered { | ||
// initial: names.to_vec(), | ||
// filtered: names.to_vec(), | ||
// }); | ||
} | ||
|
||
log::info!("Filtered list of candidates: {:?}", filtered_candidates); | ||
log::info!( |
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.
We should really migrate to tracing and use spans to get have proper log context :)
@@ -508,7 +510,10 @@ pub(super) async fn handle_command( | |||
{ | |||
// This is a comment, so there must already be a reviewer assigned. No need to assign anyone else. | |||
issue | |||
.post_comment(&ctx.github, &on_vacation_msg(&username)) |
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 find the functions better than the consts, because with the function you cannot forget to pass the required placeholders, with the static string you can easily just use it without replacing the placeholder.
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.
This PR should hopefully only improve logging, so let's ship it.
This PR contains:
Besides these changes, nothing in the PR assignment changes. Overall, this should help us getting more insights from the logs. I've tried splitting the changes in commits to make the review easier.
Thanks!
r? @Kobzol or @jackh726