run prettier to clear linter warnings
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
fail_on_severity: critical
|
||||
allow_licenses:
|
||||
- "BSD"
|
||||
- "GPL 2"
|
||||
- 'BSD'
|
||||
- 'GPL 2'
|
||||
|
||||
@@ -1 +1 @@
|
||||
allow-licenses: "MIT, GPL-2.0-only"
|
||||
allow-licenses: 'MIT, GPL-2.0-only'
|
||||
|
||||
@@ -113,7 +113,7 @@ test('returns minimal summary in case the core.summary is too large for a PR com
|
||||
let changes: Changes = [
|
||||
createTestChange({name: 'lodash', version: '1.2.3'}),
|
||||
createTestChange({name: 'colors', version: '2.3.4'}),
|
||||
createTestChange({name: '@foo/bar', version: '*'}),
|
||||
createTestChange({name: '@foo/bar', version: '*'})
|
||||
]
|
||||
|
||||
let minSummary: string = summary.addSummaryToSummary(
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ const COMMENT_MARKER = '<!-- dependency-review-pr-comment-marker -->'
|
||||
|
||||
export async function commentPr(
|
||||
commentContent: string,
|
||||
config: ConfigurationOptions,
|
||||
config: ConfigurationOptions
|
||||
): Promise<void> {
|
||||
if (
|
||||
!(
|
||||
|
||||
+1
-5
@@ -22,13 +22,9 @@ import * as summary from './summary'
|
||||
import {getRefs} from './git-refs'
|
||||
|
||||
import {groupDependenciesByManifest} from './utils'
|
||||
import {
|
||||
commentPr,
|
||||
MAX_COMMENT_LENGTH
|
||||
} from './comment-pr'
|
||||
import {commentPr, MAX_COMMENT_LENGTH} from './comment-pr'
|
||||
import {getDeniedChanges} from './deny'
|
||||
|
||||
|
||||
async function delay(ms: number): Promise<void> {
|
||||
return new Promise(resolve => setTimeout(resolve, ms))
|
||||
}
|
||||
|
||||
+9
-7
@@ -18,9 +18,9 @@ export function addSummaryToSummary(
|
||||
invalidLicenseChanges: InvalidLicenseChanges,
|
||||
deniedChanges: Changes,
|
||||
scorecard: Scorecard,
|
||||
config: ConfigurationOptions,
|
||||
config: ConfigurationOptions
|
||||
): string {
|
||||
let out: string[] = [];
|
||||
let out: string[] = []
|
||||
|
||||
const scorecardWarnings = countScorecardWarnings(scorecard, config)
|
||||
const licenseIssues = countLicenseIssues(invalidLicenseChanges)
|
||||
@@ -52,12 +52,12 @@ export function addSummaryToSummary(
|
||||
return out.join('\n')
|
||||
}
|
||||
|
||||
const foundIssuesHeader = 'The following issues were found:'
|
||||
const foundIssuesHeader = 'The following issues were found:'
|
||||
core.summary.addRaw(foundIssuesHeader)
|
||||
out.push(foundIssuesHeader)
|
||||
|
||||
const summaryList: string[] = [
|
||||
...(config.vulnerability_check
|
||||
...(config.vulnerability_check
|
||||
? [
|
||||
`${checkOrFailIcon(vulnerableChanges.length)} ${
|
||||
vulnerableChanges.length
|
||||
@@ -89,15 +89,17 @@ export function addSummaryToSummary(
|
||||
`${checkOrWarnIcon(scorecardWarnings)} ${scorecardWarnings ? scorecardWarnings : 'No'} packages with OpenSSF Scorecard issues.`
|
||||
]
|
||||
: [])
|
||||
];
|
||||
]
|
||||
|
||||
core.summary.addList(summaryList)
|
||||
summaryList.forEach( (line) => {
|
||||
summaryList.forEach(line => {
|
||||
out.push('* ' + line)
|
||||
})
|
||||
|
||||
core.summary.addRaw('See the Details below.')
|
||||
out.push(`\n[View full job summary](${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID})`)
|
||||
out.push(
|
||||
`\n[View full job summary](${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID})`
|
||||
)
|
||||
|
||||
return out.join('\n')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user