Skip to content

Add environment variable to override gitleaks baseRef#113

Merged
zricethezav merged 2 commits into
gitleaks:masterfrom
paulschuberth:master
Apr 16, 2025
Merged

Add environment variable to override gitleaks baseRef#113
zricethezav merged 2 commits into
gitleaks:masterfrom
paulschuberth:master

Conversation

@paulschuberth

@paulschuberth paulschuberth commented Apr 15, 2023

Copy link
Copy Markdown
Contributor

(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

Copy link
Copy Markdown

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

@zricethezav

Copy link
Copy Markdown
Collaborator

Hello from 2025. Sorry for the delay 😅

Looks reasonable. Merging

@zricethezav zricethezav merged commit b96e8de into gitleaks:master Apr 16, 2025
gps035 added a commit to gps035/gitleaks-action that referenced this pull request Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants