Make vulnerabilities be [] by default.
This commit is contained in:
+1
@@ -228,6 +228,7 @@ exports.ChangeSchema = z.object({
|
|||||||
advisory_url: z.string()
|
advisory_url: z.string()
|
||||||
}))
|
}))
|
||||||
.optional()
|
.optional()
|
||||||
|
.default([])
|
||||||
});
|
});
|
||||||
exports.PullRequestSchema = z.object({
|
exports.PullRequestSchema = z.object({
|
||||||
number: z.number(),
|
number: z.number(),
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -68,7 +68,7 @@ async function run(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function printChangeVulnerabilities(change: Change) {
|
function printChangeVulnerabilities(change: Change) {
|
||||||
for (const vuln of change.vulnerabilities!) {
|
for (const vuln of change.vulnerabilities) {
|
||||||
core.info(
|
core.info(
|
||||||
`${styles.bold.open}${change.manifest} » ${change.name}@${change.version
|
`${styles.bold.open}${change.manifest} » ${change.name}@${change.version
|
||||||
}${styles.bold.close} – ${vuln.advisory_summary} ${renderSeverity(
|
}${styles.bold.close} – ${vuln.advisory_summary} ${renderSeverity(
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ export const ChangeSchema = z.object({
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
.optional()
|
.optional()
|
||||||
|
.default([])
|
||||||
})
|
})
|
||||||
|
|
||||||
export const PullRequestSchema = z.object({
|
export const PullRequestSchema = z.object({
|
||||||
|
|||||||
Reference in New Issue
Block a user