From 79a7ad52a7ceb5c18c708d5e340337f5b5553bed Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 15 Oct 2021 19:40:43 -0400 Subject: [PATCH] build: use the correct base branch for xsscommitlint It might not be master! (cherry picked from commit fc894e1fd8977ac450118887a1914ca248e3571c) --- .github/workflows/quality-checks.yml | 3 ++- scripts/xss-commit-linter.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/quality-checks.yml b/.github/workflows/quality-checks.yml index ecaac2ac88..5ee54e43a7 100644 --- a/.github/workflows/quality-checks.yml +++ b/.github/workflows/quality-checks.yml @@ -24,7 +24,7 @@ jobs: fetch-depth: 2 - name: Fetch master for comparison - run: git fetch --depth=1 origin master + run: git fetch --depth=1 origin ${{ github.base_ref }} - name: Install Required System Packages run: sudo apt-get update && sudo apt-get install libxmlsec1-dev @@ -65,6 +65,7 @@ jobs: SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh SHARD: 4 PIP_SRC_DIR: ${{ runner.temp }} + TARGET_BRANCH: ${{ github.base_ref }} run: | ./scripts/all-tests.sh diff --git a/scripts/xss-commit-linter.sh b/scripts/xss-commit-linter.sh index e63c87d33f..bbf7cc3899 100755 --- a/scripts/xss-commit-linter.sh +++ b/scripts/xss-commit-linter.sh @@ -34,6 +34,7 @@ show_verbose() { echo "Files linted is based on the following:" echo "- Current commit: ${current_branch_hash}" echo "- Main commit: ${MAIN_COMMIT}" + echo "- Target branch: ${TARGET_BRANCH}" echo "- Merge base command: ${merge_base_command}" echo "- Merge base: ${merge_base}" echo "- Diff command: ${diff_command}"