Skip to content

Commit 754f2e1

Browse files
committed
Simplify step.uses condition
1 parent bb98ff4 commit 754f2e1

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

lib/init-action.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/workflow.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,7 @@ export async function getWorkflowErrors(
168168
for (const job of Object.values(doc?.jobs || {})) {
169169
if (Array.isArray(job.steps)) {
170170
for (const step of job.steps) {
171-
if (
172-
step.uses !== undefined &&
173-
step.uses.startsWith("github/codeql-action/")
174-
) {
171+
if (step.uses?.startsWith("github/codeql-action/")) {
175172
const parts = step.uses.split("@");
176173
if (parts.length >= 2) {
177174
codeqlStepRefs.push(parts[parts.length - 1]);

0 commit comments

Comments
 (0)