Make vulnerabilities be [] by default.

This commit is contained in:
Federico Builes
2022-06-01 05:36:46 +02:00
parent 7063d0ca45
commit 7db11574b7
4 changed files with 4 additions and 2 deletions
Generated Vendored
+1
View File
@@ -228,6 +228,7 @@ exports.ChangeSchema = z.object({
advisory_url: z.string()
}))
.optional()
.default([])
});
exports.PullRequestSchema = z.object({
number: z.number(),
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -68,7 +68,7 @@ async function run(): Promise<void> {
}
function printChangeVulnerabilities(change: Change) {
for (const vuln of change.vulnerabilities!) {
for (const vuln of change.vulnerabilities) {
core.info(
`${styles.bold.open}${change.manifest} » ${change.name}@${change.version
}${styles.bold.close} ${vuln.advisory_summary} ${renderSeverity(
+1
View File
@@ -19,6 +19,7 @@ export const ChangeSchema = z.object({
})
)
.optional()
.default([])
})
export const PullRequestSchema = z.object({