Skip to content

Commit

Permalink
fix: check depName during autoReplace
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Apr 27, 2020
1 parent c7c24a6 commit c890ac9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/workers/branch/auto-replace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,21 @@ export async function confirmIfDepUpdated(
logger.debug('Failed to parse newContent');
}
if (!newUpgrade) {
logger.debug('No newUpgrade');
return false;
}
// istanbul ignore if
if (upgrade.depName !== newUpgrade.depName) {
logger.debug(
{ currentDepName: upgrade.depName, newDepName: newUpgrade.depName },
'depName mismatch'
);
}
if (newUpgrade.currentValue !== newValue) {
logger.debug(
{ expectedValue: newValue, foundValue: newUpgrade.currentValue },
'Value mismatch'
);
return false;
}
if (!newDigest) {
Expand Down

0 comments on commit c890ac9

Please sign in to comment.