Skip to content

Commit

Permalink
chore: improve logging of reviewers (#29599)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins authored Jun 11, 2024
1 parent 381fa55 commit f21efd3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/workers/repository/update/pr/participants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,26 @@ export async function addParticipants(
let reviewers = config.reviewers ?? [];
if (config.reviewersFromCodeOwners) {
reviewers = await addCodeOwners(config, reviewers, pr);
logger.debug(
`Reviewers from code owners: ${reviewers.map((reviewer) => `"${reviewer}"`).join(', ')}`,
);
}
if (
is.array(config.additionalReviewers) &&
config.additionalReviewers.length > 0
) {
logger.debug(
`Additional reviewers: ${config.additionalReviewers.map((reviewer) => `"${reviewer}"`).join(', ')}`,
);
reviewers = reviewers.concat(config.additionalReviewers);
}
if (reviewers.length > 0) {
try {
reviewers = await prepareParticipants(config, reviewers);
if (is.number(config.reviewersSampleSize)) {
logger.debug(
`Sampling reviewersSampleSize=${config.reviewersSampleSize} reviewers`,
);
reviewers = sampleSize(reviewers, config.reviewersSampleSize);
}
if (reviewers.length > 0) {
Expand Down

0 comments on commit f21efd3

Please sign in to comment.