Skip to content

Commit

Permalink
Improve Bugzilla::getBugsFromHgWeb() to better count backouts
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalchevrel committed Jan 8, 2025
1 parent 4b5c4d8 commit dce1052
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/classes/ReleaseInsights/Bugzilla.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static function getBugsFromHgWeb(string $query, bool $detect_backouts = f

$matches[0] = array_map('trim', $matches[0]);
}
return $matches[0];
return count($matches[0]) > 1 ? [$matches[0][0]] : $matches[0];
};

foreach ($changesets as $items) {
Expand All @@ -106,7 +106,7 @@ public static function getBugsFromHgWeb(string $query, bool $detect_backouts = f
continue;
}

if (Utils::inString($subitem, ['backed out', 'back out', 'Back out']) && $detect_backouts === true) {
if (Utils::inString($subitem, ['Backed out', 'backed out', 'back out', 'Back out']) && $detect_backouts === true) {
$counter = count($bug_fixes);
$bug_fixes = array_diff($bug_fixes, $get_bugs($subitem));
if ($counter === count($bug_fixes)) {
Expand Down

0 comments on commit dce1052

Please sign in to comment.