gitleaks / gitleaks-action

Protect your secrets using Gitleaks-Action
https://gitleaks.io
Other
319 stars 122 forks source link

Add environment variable to override gitleaks baseRef #113

Open paulschuberth opened 1 year ago

paulschuberth commented 1 year ago

(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.

chandanrattan commented 1 year ago

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