potiuk commented on a change in pull request #11656:
URL: https://github.com/apache/airflow/pull/11656#discussion_r507821146



##########
File path: scripts/ci/selective_ci_checks.sh
##########
@@ -121,76 +182,93 @@ function show_changed_files() {
 # Output:
 #    Count of changed files matching the patterns
 function count_changed_files() {
+    local count_changed_files
     count_changed_files=$(echo "${CHANGED_FILES}" | grep -c -E 
"$(get_regexp_from_patterns)" || true)
     echo "${count_changed_files}"
 }
 
-function run_all_tests_when_push_or_schedule() {
-    if [[ ${GITHUB_EVENT_NAME} == "push" || ${GITHUB_EVENT_NAME} == "schedule" 
]]; then
-        echo
-        echo "Always run all tests in case of push/schedule events"
-        echo
-        set_outputs_run_all_tests
-        exit
+function check_if_api_tests_should_be_run() {
+    local pattern_array=(
+        "^airflow/api"
+    )
+    show_changed_files

Review comment:
       Yep. See here: https://tldp.org/LDP/abs/html/localvar.html. This is 
built in bash:
   
   > However, as Thomas Braunberger points out, a local variable declared in a 
function is also visible to functions called by the parent function.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to