File tree 1 file changed +22
-1
lines changed
1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -123,8 +123,29 @@ jobs:
123
123
git commit --all -m "$NEW_COMMIT_MSG"
124
124
git push
125
125
126
+ # It's possible that for some puzzles we haven't created issues yet
127
+ # (because of network, rate limit or other kind of errors)
128
+ - name : Check whether there are puzzles without related issues
129
+ if : env.PUZZLES_FILES_MODIFIED == 'no'
130
+ working-directory : generated-todos
131
+ run : |
132
+ NEW_PIZZLES="$(comm -23 <(cut -d$'\t' -f1 todos-in-code.tsv | sort) <(cut -d$'\t' -f1 todos-on-github.tsv | sort))"
133
+ if [ -n "$NEW_PIZZLES" ]; then
134
+ echo "Found puzzles without related issues:"
135
+ echo "$NEW_PUZZLES" | while read PUZZLE_ID; do
136
+ grep "$PUZZLE_ID" todos-in-code.tsv | IFS=$'\t' read SKIP_PUZZLE_ID TICKET TITLE REST
137
+ echo "$PUZZLE_ID from #$TICKET: $(echo "$TITLE" | sed 's|^"||;s|"$||;s|""|"|'g)"
138
+ done
139
+ HAVE_PUZZLES_WITHOUT_ISSUES=yes
140
+ else
141
+ HAVE_PUZZLES_WITHOUT_ISSUES=no
142
+ fi
143
+
144
+ # Make variable available for the next steps
145
+ echo "HAVE_PUZZLES_WITHOUT_ISSUES=$HAVE_PUZZLES_WITHOUT_ISSUES" | tee -a "$GITHUB_ENV"
146
+
126
147
- name : Connect todos to the issues
127
- if : env.PUZZLES_FILES_MODIFIED == 'yes'
148
+ if : env.PUZZLES_FILES_MODIFIED == 'yes' || env.HAVE_PUZZLES_WITHOUT_ISSUES == 'yes'
128
149
env :
129
150
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
130
151
run : ./src/main/scripts/ci/connect-todos-to-issues.sh generated-todos/todos-in-code.tsv
You can’t perform that action at this time.
0 commit comments