gitleaks-action icon indicating copy to clipboard operation
gitleaks-action copied to clipboard

Add environment variable to override gitleaks baseRef

Open paulschuberth opened this issue 2 years ago • 1 comments

(At least) in repositories that have allowed merges with unrelated histories in the past, the following git command fails.

git -C . log -p -U0 --no-merges --first-parent $BASE_REF^..$HEAD_REF

By default $BASE_REF is the first commit returned by the call to GitHub's API at GET /repos/{owner}/{repo}/pulls/{pull_number}/commits.

The changes in this PR allow to override this using the BASE_REF environment variable.

paulschuberth avatar Apr 15 '23 12:04 paulschuberth

Hi, Even i am facing this issue while raising the PR. Can we this be look into merge into ?

chandanrattan avatar Jul 05 '23 05:07 chandanrattan