WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit f65dee2

Browse files
authored
Merge pull request #79 from gitleaks/fix/update-git-log-for-prs
Draft: update git log options
2 parents f2f91c8 + cf4faf3 commit f65dee2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

dist/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69821,7 +69821,9 @@ async function Scan(gitleaksEnableUploadArtifact, scanInfo, eventType) {
6982169821
// scan only one commit
6982269822
args.push(`--log-opts=-1`);
6982369823
} else {
69824-
args.push(`--log-opts=${scanInfo.baseRef}^..${scanInfo.headRef}`);
69824+
args.push(
69825+
`--log-opts=--no-merges --first-parent ${scanInfo.baseRef}^..${scanInfo.headRef}`
69826+
);
6982569827
}
6982669828
}
6982769829
core.info(`gitleaks cmd: gitleaks ${args.join(" ")}`);

src/gitleaks.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ async function Scan(gitleaksEnableUploadArtifact, scanInfo, eventType) {
105105
// scan only one commit
106106
args.push(`--log-opts=-1`);
107107
} else {
108-
args.push(`--log-opts=${scanInfo.baseRef}^..${scanInfo.headRef}`);
108+
args.push(
109+
`--log-opts=--no-merges --first-parent ${scanInfo.baseRef}^..${scanInfo.headRef}`
110+
);
109111
}
110112
}
111113
core.info(`gitleaks cmd: gitleaks ${args.join(" ")}`);

0 commit comments

Comments
 (0)