Update copy and styling
This commit is contained in:
@@ -120,7 +120,7 @@ test('adds deprecation warning for deny-licenses option', () => {
|
||||
const text = core.summary.stringify()
|
||||
|
||||
expect(text).toContain(
|
||||
'⚠️ The <em>deny-licenses</em> option is deprecated and will be removed in a future version, use <em>allow-licenses</em> instead.'
|
||||
'⚠️ <strong>Deprecation Warning</strong>: The <em>deny-licenses</em> option is deprecated and will be removed in a future version, use <em>allow-licenses</em> instead.'
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
+2
-3
@@ -1600,12 +1600,12 @@ const MAX_SCANNED_FILES_BYTES = 1048576;
|
||||
// returns the DR summary string, ready to be posted as a PR comment if the
|
||||
// final DR report is too large
|
||||
function addSummaryToSummary(vulnerableChanges, invalidLicenseChanges, deniedChanges, scorecard, config) {
|
||||
addDenyListsDeprecationWarningToSummary();
|
||||
const out = [];
|
||||
const scorecardWarnings = countScorecardWarnings(scorecard, config);
|
||||
const licenseIssues = countLicenseIssues(invalidLicenseChanges);
|
||||
core.summary.addHeading('Dependency Review', 1);
|
||||
out.push('# Dependency Review');
|
||||
addDenyListsDeprecationWarningToSummary();
|
||||
if (vulnerableChanges.length === 0 &&
|
||||
licenseIssues === 0 &&
|
||||
deniedChanges.length === 0 &&
|
||||
@@ -1662,8 +1662,7 @@ function addSummaryToSummary(vulnerableChanges, invalidLicenseChanges, deniedCha
|
||||
return out.join('\n');
|
||||
}
|
||||
function addDenyListsDeprecationWarningToSummary() {
|
||||
core.summary.addRaw(`${icons.warning} The <em>deny-licenses</em> option is deprecated and will be removed in a future version, use <em>allow-licenses</em> instead.<br>`, true);
|
||||
core.summary.addEOL();
|
||||
core.summary.addRaw(`${icons.warning} <strong>Deprecation Warning</strong>: The <em>deny-licenses</em> option is deprecated and will be removed in a future version, use <em>allow-licenses</em> instead.`, true);
|
||||
}
|
||||
function countScorecardWarnings(scorecard, config) {
|
||||
return scorecard.dependencies.reduce((total, dependency) => {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+3
-4
@@ -22,6 +22,8 @@ export function addSummaryToSummary(
|
||||
scorecard: Scorecard,
|
||||
config: ConfigurationOptions
|
||||
): string {
|
||||
addDenyListsDeprecationWarningToSummary()
|
||||
|
||||
const out: string[] = []
|
||||
|
||||
const scorecardWarnings = countScorecardWarnings(scorecard, config)
|
||||
@@ -30,8 +32,6 @@ export function addSummaryToSummary(
|
||||
core.summary.addHeading('Dependency Review', 1)
|
||||
out.push('# Dependency Review')
|
||||
|
||||
addDenyListsDeprecationWarningToSummary()
|
||||
|
||||
if (
|
||||
vulnerableChanges.length === 0 &&
|
||||
licenseIssues === 0 &&
|
||||
@@ -110,10 +110,9 @@ export function addSummaryToSummary(
|
||||
|
||||
function addDenyListsDeprecationWarningToSummary(): void {
|
||||
core.summary.addRaw(
|
||||
`${icons.warning} The <em>deny-licenses</em> option is deprecated and will be removed in a future version, use <em>allow-licenses</em> instead.<br>`,
|
||||
`${icons.warning} <strong>Deprecation Warning</strong>: The <em>deny-licenses</em> option is deprecated and will be removed in a future version, use <em>allow-licenses</em> instead.`,
|
||||
true
|
||||
)
|
||||
core.summary.addEOL()
|
||||
}
|
||||
|
||||
function countScorecardWarnings(
|
||||
|
||||
Reference in New Issue
Block a user