File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 77# USAGE flag "--head <head>" help="head branch to compare against" default=""
88# USAGE flag "--event <event>" help="PR name" default="pull_request"
99
10- if [ " $usage_head " == " ''" ]; then
10+ if [ " $usage_head " = " ''" ]; then
1111 usage_head=" "
1212fi
1313
1414# Check if lychee config was modified
15- config_modified=$( git diff --name-only --merge-base " $usage_base " " $usage_head " \
16- | grep -E ' ^(\.github/config/lychee\.toml|.mise/tasks/lint|mise\.toml)$' || true)
15+ # shellcheck disable=SC2086
16+ # - because usage_head may be empty
17+ config_modified=$( git diff --name-only --merge-base " $usage_base " $usage_head \
18+ | grep -E ' ^(\.github/config/lychee\.toml|\.mise/tasks/lint/.*|mise\.toml)$' || true)
1719
1820if [ -n " $config_modified " ] ; then
1921 echo " config changes, checking all files."
@@ -24,7 +26,9 @@ elif [ "$usage_event" != "pull_request" ] ; then
2426else
2527 # Using lychee's default extension filter here to match when it runs against all files
2628 # Note: --diff-filter=d filters out deleted files
27- modified_files=$( git diff --name-only --diff-filter=d " $usage_base " " $usage_head " \
29+ # shellcheck disable=SC2086
30+ # - because usage_head may be empty
31+ modified_files=$( git diff --name-only --diff-filter=d " $usage_base " $usage_head \
2832 | grep -E ' \.(md|mkd|mdx|mdown|mdwn|mkdn|mkdown|markdown|html|htm|txt)$' \
2933 | tr ' \n' ' ' || true)
3034
You can’t perform that action at this time.
0 commit comments