Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 11c590c

Browse files
committed
Fix issue with missing commits
[changelog:fixed]
1 parent ab2a340 commit 11c590c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

lib/audit.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -290,13 +290,15 @@ async function auditRepository(
290290
repoId,
291291
});
292292

293-
// Run npm audit fix
294-
await pushHandler({
295-
...ctx,
296-
data: {
297-
Push: headCommit.Branch[0].commit.pushes,
298-
},
299-
});
293+
if (headCommit?.Branch?.[0]?.commit?.pushes?.length > 0) {
294+
// Run npm audit fix
295+
await pushHandler({
296+
...ctx,
297+
data: {
298+
Push: headCommit.Branch[0].commit.pushes,
299+
},
300+
});
301+
}
300302
} else {
301303
log.info(
302304
`npm audit report for ${request.owner}/${request.repo} not different to existing`,

0 commit comments

Comments
 (0)