Skip to content

Commit

Permalink
test/golangci: Fetch GITHUB_BEFORE reference
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Dec 15, 2023
1 parent ab5bee1 commit 42eb4de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/lint/golangci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ if [ -n "${GITHUB_BASE_REF:-}" ]; then
elif [ -n "${GITHUB_BEFORE:-}" ]; then
# Target branch when scanning a Github merge
target_branch="${GITHUB_BEFORE}"

# Attempt to fetch the reference (Github uses a shallow clone).
git fetch -q origin "${GITHUB_BEFORE}" || true
elif [ -n "${1:-}" ]; then
# Allow a target branch parameter.
target_branch="${1}"
Expand Down

0 comments on commit 42eb4de

Please sign in to comment.