File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -229,12 +229,23 @@ main() {
229
229
230
230
while IFS= read -r line; do
231
231
last_line=" $line "
232
- if ! [[ " $line " =~ [cC]ompanion:[[:space:]]* ([^[:space:]]+) ]]; then
233
- continue
234
- fi
235
232
236
- echo " detected companion in PR description: ${BASH_REMATCH[1]} "
237
- process_companion_pr " ${BASH_REMATCH[1]} "
233
+ if [[ " $line " =~ [cC]ompanion:[[:space:]]* ([^[:space:]]+) ]]; then
234
+ echo " Detected companion in PR description: ${BASH_REMATCH[1]} "
235
+ process_companion_pr " ${BASH_REMATCH[1]} "
236
+ elif [[ " $line " =~ skip[^[:alnum:]]+ ([^[:space:]]+) ]]; then
237
+ # FIXME: This escape hatch should be removed at some point when the
238
+ # companion build system is able to deal with all edge cases, such as
239
+ # the one described in
240
+ # https://github.com/paritytech/pipeline-scripts/issues/3#issuecomment-947539791
241
+ if [[
242
+ " ${BASH_REMATCH[1]} " = " $CI_JOB_NAME " ||
243
+ " ${BASH_REMATCH[1]} " = " continuous-integration/gitlab-$CI_JOB_NAME "
244
+ ]]; then
245
+ echo " Skipping $CI_JOB_NAME as specified in the PR description"
246
+ exit
247
+ fi
248
+ fi
238
249
done < <( curl \
239
250
-sSL \
240
251
-H " Authorization: token $GITHUB_TOKEN " \
You can’t perform that action at this time.
0 commit comments