File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,12 @@ GREEN='\033[0;32m'
6
6
RED=' \033[0;31m'
7
7
NC=' \033[0m'
8
8
9
- base_sha =$( echo " $CLONEREFS_OPTIONS " | grep -o ' "base_sha":"[^"]*" ' | cut -d ' : ' -f2 | tr -d ' " ' )
9
+ BASE_SHA =$( git ls-remote " https://github.com/openshift/configuration-anomaly-detection.git " " refs/heads/main " | awk ' {print $1} ' )
10
10
11
- if [[ -z " $base_sha " ]]; then
12
- echo -e " ${RED} Could not obtain base_sha"
13
- exit 1
14
- fi
11
+ PR_SHA=$( git rev-parse HEAD)
15
12
16
13
# Obtaining instances of files added in the PR
17
- diff_files=$( git diff --name-status " $base_sha " HEAD | grep ' ^A' | awk ' {print $2}' )
14
+ diff_files=$( git diff --name-status " $BASE_SHA " " $PR_SHA " | grep ' ^A' | awk ' {print $2}' )
18
15
19
16
# Filter to relevant directory (investigations folder)
20
17
investigations=$( echo " $diff_files " | grep ' ^pkg/investigations/' || true)
You can’t perform that action at this time.
0 commit comments