Simplify step.uses condition

This commit is contained in:
Michael B. Gale
2025-09-10 13:35:39 +01:00
parent bb98ff4838
commit 754f2e184f
2 changed files with 2 additions and 5 deletions

View File

@@ -168,10 +168,7 @@ export async function getWorkflowErrors(
for (const job of Object.values(doc?.jobs || {})) {
if (Array.isArray(job.steps)) {
for (const step of job.steps) {
if (
step.uses !== undefined &&
step.uses.startsWith("github/codeql-action/")
) {
if (step.uses?.startsWith("github/codeql-action/")) {
const parts = step.uses.split("@");
if (parts.length >= 2) {
codeqlStepRefs.push(parts[parts.length - 1]);