kennknowles commented on code in PR #37663:
URL: https://github.com/apache/beam/pull/37663#discussion_r2842153971
##########
scripts/ci/pr-bot/findPrsNeedingAttention.ts:
##########
@@ -90,11 +90,7 @@ async function isSlowReview(pull: any): Promise<boolean> {
})
).data;
for (const comment of reviewComments) {
- if (
- comments.some(
- ({ user: login }) => login !== pullAuthor && login !== BOT_NAME
- )
- ) {
+ if (comment.user.login !== pullAuthor && comment.user.login !== BOT_NAME) {
Review Comment:
Done
##########
scripts/ci/pr-bot/processNewPrs.ts:
##########
@@ -195,12 +211,25 @@ async function processPull(
// TODO(https://github.com/apache/beam/issues/21417) - also check if the
author is a committer, if they are don't auto-assign a committer
for (const approver of approvers) {
- const labelOfReviewer = prState.getLabelForReviewer(approver);
+ let labelOfReviewer = prState.getLabelForReviewer(approver);
+
+ // If the approver is a GitHub assigned reviewer but not in our label
map,
+ // we can try to guess a label from the PR to assign a committer to.
+ if (!labelOfReviewer) {
+ let isGithubReviewer = false;
+ if (pull.requested_reviewers && pull.requested_reviewers.some((r: any)
=> r.login === approver)) isGithubReviewer = true;
+
+ if (isGithubReviewer && pull.labels && pull.labels.length > 0) {
+ labelOfReviewer = pull.labels[0].name;
+ }
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]