File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,20 @@ git fetch origin
19
19
# Get new commit hash *one commit ahead* of this one
20
20
new=$( git rev-list --reverse --topo-order HEAD..origin/main | head -1)
21
21
# If there is no new commit hash to move to, nothing has changed, quit early
22
- [ -z " $new " ] && exit
22
+ if [ -z " $new " ]; then
23
+ echo " No new commits, nothing has changed, nothing to do."
24
+ exit
25
+ fi
23
26
24
27
# Move ahead to this new commit
25
28
git reset --hard " $new "
26
29
# Verify if have /dags/ in the last commit
27
30
have_dag=$( git log -p -1 " $new " --pretty=format: --name-only | grep " catalog/dags/" )
28
31
# If there is no files under /dags/ folder, no need to notify, quit early
29
- [ -z " $have_dag " ] && exit
32
+ if [ -z " $have_dag " ]; then
33
+ echo " No changes to DAGs, nothing to do."
34
+ exit
35
+ fi
30
36
31
37
# Pull out the subject from the new commit
32
38
subject=$( git log -1 --format=' %s' )
You can’t perform that action at this time.
0 commit comments