You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/10/15 09:55:31 UTC

[GitHub] [airflow] feluelle commented on a change in pull request #6321: [AIRFLOW-5649] [DO NOT MERGE] Skips tests for non .py changes

feluelle commented on a change in pull request #6321: [AIRFLOW-5649] [DO NOT MERGE] Skips tests for non .py changes
URL: https://github.com/apache/airflow/pull/6321#discussion_r334853509
 
 

 ##########
 File path: scripts/ci/_utils.sh
 ##########
 @@ -932,3 +935,17 @@ function build_image_on_ci() {
     unset AIRFLOW_CONTAINER_FORCE_PULL_IMAGES
     unset FORCE_BUILD
 }
+
+CHANGED_FILE_NAMES=$(git diff --name-only "HEAD...${TRAVIS_BRANCH:="HEAD"}")
 
 Review comment:
   `CHANGED_PY_FILES=$(git diff HEAD --diff-filter=ACMRTUXB --name-only "$@" | grep -E '\.py$')`
   
   That's what I was using in my pre commit hook before using the pre-commit framework for detecting python file changes. 
   
   I was also using `diff-filter` because I passed the file names to pylint and in case the file that changed was deleted it won't work. But I think in this case here we do not need to filter.
   
   So does the following work?
   ```suggestion
   CHANGED_FILE_NAMES=$(git diff HEAD --name-only "$@" | grep -E '\.py$')
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services