From 19f55e9d1b69c62f166e1a046b2b5bcdfc6a7594 Mon Sep 17 00:00:00 2001 From: Splines Date: Tue, 14 Nov 2023 20:48:16 +0100 Subject: [PATCH] Include target branch lookup --- .github/workflows/linter.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index fe2b3424d..031bdb483 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -32,7 +32,8 @@ jobs: # are found matching the pattern - name: Get changed ruby files (git diff) run: | - changedFiles=$(git diff-tree --name-only --diff-filter=d -r HEAD^1 HEAD | grep '\.rb$' || test $? = 1;) + targetBranch=${{ github.base_ref || 'mampf-next' }} + changedFiles=$(git diff --name-only --diff-filter=d -r $targetBranch | grep '\.rb$' || test $? = 1;) printf "Changed ruby files: \n$changedFiles" echo "CHANGED_FILES=\"$changedFiles\"" >> $GITHUB_ENV