Fix flipped conditional in DRI auto-request logic (#12792)

This commit is contained in:
Mike McNeil 2023-07-15 21:17:30 -05:00 committed by GitHub
parent 61e0c35661
commit 9badb14d98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,7 +337,7 @@ module.exports = {
let reviewer = undefined;//« whether to request review for this change
let exactMatchDri = DRI_BY_PATH[changedPath];
if (exactMatchDri) {
let isAuthorDRI = exactMatchDri !== sender.login.toLowerCase();
let isAuthorDRI = exactMatchDri === sender.login.toLowerCase();
if (isAuthorDRI) {
// If you, the author, are the DRI, then do nothing.
// No need to request review from yourself.
@ -355,8 +355,8 @@ module.exports = {
let nearestAncestralDri = DRI_BY_PATH[ancestralPath];// this is like the "catch-all" DRI, for a higher-level path
let isAuthorAncestralDRI = nearestAncestralDri !== sender.login.toLowerCase();
if (isAuthorAncestralDRI) {
let isAuthorAncestralDRI = nearestAncestralDri === sender.login.toLowerCase();
if (!isAuthorAncestralDRI) {
reviewer = nearestAncestralDri;
break;
}