Skip to content

Commit

Permalink
Merge pull request lxc#307 from stgraber/main
Browse files Browse the repository at this point in the history
test/golangci: Fetch GITHUB_BEFORE reference
  • Loading branch information
brauner authored Dec 15, 2023
2 parents 1719ffc + 42eb4de commit ede906f
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 ede906f

Please sign in to comment.