run prettier to clear linter warnings
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
fail_on_severity: critical
|
fail_on_severity: critical
|
||||||
allow_licenses:
|
allow_licenses:
|
||||||
- "BSD"
|
- 'BSD'
|
||||||
- "GPL 2"
|
- '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 = [
|
let changes: Changes = [
|
||||||
createTestChange({name: 'lodash', version: '1.2.3'}),
|
createTestChange({name: 'lodash', version: '1.2.3'}),
|
||||||
createTestChange({name: 'colors', version: '2.3.4'}),
|
createTestChange({name: 'colors', version: '2.3.4'}),
|
||||||
createTestChange({name: '@foo/bar', version: '*'}),
|
createTestChange({name: '@foo/bar', version: '*'})
|
||||||
]
|
]
|
||||||
|
|
||||||
let minSummary: string = summary.addSummaryToSummary(
|
let minSummary: string = summary.addSummaryToSummary(
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ const COMMENT_MARKER = '<!-- dependency-review-pr-comment-marker -->'
|
|||||||
|
|
||||||
export async function commentPr(
|
export async function commentPr(
|
||||||
commentContent: string,
|
commentContent: string,
|
||||||
config: ConfigurationOptions,
|
config: ConfigurationOptions
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
if (
|
if (
|
||||||
!(
|
!(
|
||||||
|
|||||||
+1
-5
@@ -22,13 +22,9 @@ import * as summary from './summary'
|
|||||||
import {getRefs} from './git-refs'
|
import {getRefs} from './git-refs'
|
||||||
|
|
||||||
import {groupDependenciesByManifest} from './utils'
|
import {groupDependenciesByManifest} from './utils'
|
||||||
import {
|
import {commentPr, MAX_COMMENT_LENGTH} from './comment-pr'
|
||||||
commentPr,
|
|
||||||
MAX_COMMENT_LENGTH
|
|
||||||
} from './comment-pr'
|
|
||||||
import {getDeniedChanges} from './deny'
|
import {getDeniedChanges} from './deny'
|
||||||
|
|
||||||
|
|
||||||
async function delay(ms: number): Promise<void> {
|
async function delay(ms: number): Promise<void> {
|
||||||
return new Promise(resolve => setTimeout(resolve, ms))
|
return new Promise(resolve => setTimeout(resolve, ms))
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-5
@@ -18,9 +18,9 @@ export function addSummaryToSummary(
|
|||||||
invalidLicenseChanges: InvalidLicenseChanges,
|
invalidLicenseChanges: InvalidLicenseChanges,
|
||||||
deniedChanges: Changes,
|
deniedChanges: Changes,
|
||||||
scorecard: Scorecard,
|
scorecard: Scorecard,
|
||||||
config: ConfigurationOptions,
|
config: ConfigurationOptions
|
||||||
): string {
|
): string {
|
||||||
let out: string[] = [];
|
let out: string[] = []
|
||||||
|
|
||||||
const scorecardWarnings = countScorecardWarnings(scorecard, config)
|
const scorecardWarnings = countScorecardWarnings(scorecard, config)
|
||||||
const licenseIssues = countLicenseIssues(invalidLicenseChanges)
|
const licenseIssues = countLicenseIssues(invalidLicenseChanges)
|
||||||
@@ -89,15 +89,17 @@ export function addSummaryToSummary(
|
|||||||
`${checkOrWarnIcon(scorecardWarnings)} ${scorecardWarnings ? scorecardWarnings : 'No'} packages with OpenSSF Scorecard issues.`
|
`${checkOrWarnIcon(scorecardWarnings)} ${scorecardWarnings ? scorecardWarnings : 'No'} packages with OpenSSF Scorecard issues.`
|
||||||
]
|
]
|
||||||
: [])
|
: [])
|
||||||
];
|
]
|
||||||
|
|
||||||
core.summary.addList(summaryList)
|
core.summary.addList(summaryList)
|
||||||
summaryList.forEach( (line) => {
|
summaryList.forEach(line => {
|
||||||
out.push('* ' + line)
|
out.push('* ' + line)
|
||||||
})
|
})
|
||||||
|
|
||||||
core.summary.addRaw('See the Details below.')
|
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')
|
return out.join('\n')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user