@@ -28,7 +28,9 @@ git_config_payload=$(jq -r '.source.git_config // []' <<< "$payload")
2828ref=$( jq -r ' .version.ref // ""' <<< " $payload" )
2929skip_ci_disabled=$( jq -r ' .source.disable_ci_skip // false' <<< " $payload" )
3030filter_include=$( jq ' .source.commit_filter.include // []' <<< " $payload" )
31+ filter_include_all_match=$( jq -r ' .source.commit_filter.include_all_match // false' <<< " $payload" )
3132filter_exclude=$( jq ' .source.commit_filter.exclude // []' <<< " $payload" )
33+ filter_exclude_all_match=$( jq -r ' .source.commit_filter.exclude_all_match // false' <<< " $payload" )
3234version_depth=$( jq -r ' .source.version_depth // 1' <<< " $payload" )
3335reverse=false
3436
@@ -120,25 +122,32 @@ else
120122 paths_search=` echo " -- $paths $ignore_paths " | tr " \n\r" " " `
121123fi
122124
125+ set -x
123126list_command=" git rev-list --all --first-parent $log_range $paths_search "
124127if jq -e ' length > 0' <<< " $filter_include"
125128then
126129 list_command+=" | git rev-list --stdin --date-order --first-parent --no-walk=unsorted "
127- whitelist_items =$( echo $filter_include | jq -r -c ' .[]' )
128- for wli in " $whitelist_items "
130+ include_items =$( echo $filter_include | jq -r -c ' .[]' )
131+ for wli in " $include_items "
129132 do
130133 list_command+=" --grep=\" $wli \" "
131134 done
135+ if [ " $filter_include_all_match " == " true" ]; then
136+ list_command+=" --all-match"
137+ fi
132138fi
133139
134140if jq -e ' length > 0' <<< " $filter_exclude"
135141then
136- list_command+=" | git rev-list --stdin --date-order --invert-grep --first-parent --no-walk=unsorted "
137- blacklist_items =$( echo $filter_exclude | jq -r -c ' .[]' )
138- for bli in " $blacklist_items "
142+ list_command+=" | git rev-list --stdin --date-order --invert-grep --first-parent --no-walk=unsorted "
143+ exclude_items =$( echo $filter_exclude | jq -r -c ' .[]' )
144+ for bli in " $exclude_items "
139145 do
140146 list_command+=" --grep=\" $bli \" "
141147 done
148+ if [ " $filter_exclude_all_match " == " true" ]; then
149+ list_command+=" --all-match"
150+ fi
142151fi
143152
144153
0 commit comments