File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 78
78
run : |
79
79
# Skip if PR has label "no-ml"
80
80
if echo "$PR_LABELS" | grep -qiE "(^|,)no-ml(,|$)"; then
81
- echo "Opt-out label present: skipping mailing list."
82
- echo "Opt-out label present: skipping mailing list." > $GITHUB_STEP_SUMMARY
81
+ echo "Opt-out label present: skipping mailing list." | tee $GITHUB_STEP_SUMMARY
83
82
exit 0
84
83
fi
85
84
@@ -104,21 +103,27 @@ jobs:
104
103
git fetch origin "pull/$PR_NUMBER/head"
105
104
106
105
gh api repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/commits --jq '.[].sha' | while read SHA1; do
106
+ echo "Looking at $SHA1"
107
107
if grep -q -E "$regex" <(git diff-tree --no-commit-id --name-only -r "$SHA1"); then
108
108
echo "Touching something not to be upstreamed, skipping commit $SHA1"
109
109
else
110
110
echo "$SHA1" >> /tmp/commits.txt
111
111
fi
112
112
done
113
113
114
+ if [ ! -f /tmp/commits.txt ]; then
115
+ echo "No commits to send email for" | tee $GITHUB_STEP_SUMMARY
116
+ exit 0
117
+ fi
118
+
114
119
COUNT=$(wc -l < /tmp/commits.txt)
115
120
echo "COUNT=$COUNT" >> $GITHUB_ENV
116
121
117
122
- name : Check what to do based on series' size
118
123
run : |
119
124
MAX=150
120
125
if [ "${COUNT}" -gt "$MAX" ]; then
121
- echo "Series has $COUNT commits (> $MAX). Not doing anything" >> $GITHUB_STEP_SUMMARY
126
+ echo "Series has $COUNT commits (> $MAX). Not doing anything" | tee $GITHUB_STEP_SUMMARY
122
127
exit 0
123
128
fi
124
129
You can’t perform that action at this time.
0 commit comments