You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by cr...@apache.org on 2020/05/19 17:04:23 UTC

[incubator-superset] branch master updated: build: conditionally run fossa check if dependency files change (#9814)

This is an automated email from the ASF dual-hosted git repository.

craigrueda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 68832d2  build: conditionally run fossa check if dependency files change (#9814)
68832d2 is described below

commit 68832d2fa50ad18f4523b8ffb50dc8976ccdc2ec
Author: ʈᵃᵢ <td...@gmail.com>
AuthorDate: Tue May 19 10:03:59 2020 -0700

    build: conditionally run fossa check if dependency files change (#9814)
---
 .github/workflows/license-check.yml | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml
index 4ecd459..6f0352c 100644
--- a/.github/workflows/license-check.yml
+++ b/.github/workflows/license-check.yml
@@ -17,6 +17,24 @@ jobs:
     - name: Generate fossa report
       env:
         FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
-      run: ./scripts/fossa.sh
+      run: |
+        set -eo pipefail
+        URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"
+        FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename')
+
+        cat<<EOF
+        CHANGED FILES:
+        $FILES
+        
+        EOF
+
+        if [[ "$FILES" =~ ^(.*package*\.json|.*requirements*\.txt)$ ]]; then
+          echo "Detected dependency changes... running fossa check"
+
+          ./scripts/fossa.sh
+        else
+          echo "No dependency changes... skiping fossa check"
+        fi
+      shell: bash
     - name: Run license check
       run: ./scripts/check_license.sh