GitHub webhook: fixes #4827 (#4828)

followup fix for #4827  (this is what I get for rushing)
This commit is contained in:
Mike McNeil
2022-03-26 00:09:30 -05:00
committed by GitHub
parent 11f752d8b9
commit 4531a0aa7a
+2 -2
View File
@@ -243,7 +243,7 @@ module.exports = {
require('assert')(sender.login !== undefined);
sails.log.verbose(`…checking DRI of changed path "${changedPath}"`);
let selfMergers = DRI_BY_PATH[changedPath] ? [].concat(DRI_BY_PATH[changedPath]) : undefined;// « ensure array
let selfMergers = DRI_BY_PATH[changedPath] ? [].concat(DRI_BY_PATH[changedPath]) : [];// « ensure array
if (selfMergers.includes(sender.login) || (isSenderMaintainer && selfMergers.includes('*'))) {
return true;
}//•
@@ -251,7 +251,7 @@ module.exports = {
while (numRemainingPathsToCheck > 0) {
let ancestralPath = changedPath.split('/').slice(0, -1 * numRemainingPathsToCheck).join('/');
sails.log.verbose(`…checking DRI of ancestral path "${ancestralPath}" for changed path`);
let selfMergers = DRI_BY_PATH[ancestralPath] ? [].concat(DRI_BY_PATH[ancestralPath]) : undefined;// « ensure array
let selfMergers = DRI_BY_PATH[ancestralPath] ? [].concat(DRI_BY_PATH[ancestralPath]) : [];// « ensure array
if (selfMergers.includes(sender.login) || (isSenderMaintainer && selfMergers.includes('*'))) {
return true;
}//•