fix: Dependency dashboard message cleanup (#18857)

This commit is contained in:
Sergei Zharinov 2022-11-10 15:17:30 +03:00 committed by GitHub
parent 76b536e23a
commit 6f051f3ae7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,7 @@ import type { RenovateConfig } from '../../config/types';
import { logger } from '../../logger';
import type { PackageFile } from '../../modules/manager/types';
import { emojify } from '../../util/emoji';
import { regEx } from '../../util/regex';
import type { DepWarnings } from '../types';
export function getWarnings(config: RenovateConfig): string {
@ -111,7 +112,9 @@ export function getDepWarningsDashboard(
}
const depWarnings = warnings
.map((w) => w.replace('Failed to look up dependency ', ''))
.map((w) =>
w.replace(regEx(/^Failed to look up(?: [-\w]+)? dependency /), '')
)
.map((dep) => '`' + dep + '`')
.join(', ');