Ignore snapshot_warnings for missing head snapshots

This commit is contained in:
Justin Holguín
2023-03-23 22:59:07 +00:00
committed by GitHub
parent 419396de41
commit 782549c724
3 changed files with 18 additions and 1 deletions
Generated Vendored
+8
View File
@@ -910,6 +910,14 @@ function addScannedDependencies(changes) {
}
exports.addScannedDependencies = addScannedDependencies;
function addSnapshotWarnings(warnings) {
// For now, we want to ignore warnings that just complain
// about missing snapshots on the head SHA. This is a product
// decision to avoid presenting warnings to users who simply
// don't use snapshots.
const ignore_regex = new RegExp(/No.*snapshot.*found.*head.*/, 'i');
if (ignore_regex.test(warnings)) {
return;
}
core.summary.addHeading('Snapshot Warnings', 2);
core.summary.addQuote(`${icons.warning}: ${warnings}`);
core.summary.addRaw('See the documentation for troubleshooting help.');
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+9
View File
@@ -216,6 +216,15 @@ export function addScannedDependencies(changes: Changes): void {
}
export function addSnapshotWarnings(warnings: string): void {
// For now, we want to ignore warnings that just complain
// about missing snapshots on the head SHA. This is a product
// decision to avoid presenting warnings to users who simply
// don't use snapshots.
const ignore_regex = new RegExp(/No.*snapshot.*found.*head.*/, 'i')
if (ignore_regex.test(warnings)) {
return
}
core.summary.addHeading('Snapshot Warnings', 2)
core.summary.addQuote(`${icons.warning}: ${warnings}`)
core.summary.addRaw('See the documentation for troubleshooting help.')