File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed
Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,20 @@ version: 2.1
99#
1010
1111commands :
12+ check-skip :
13+ steps :
14+ - run :
15+ name : Check-skip
16+ command : |
17+ git log --max-count=1 --pretty=format:"%B" | tr "\n" " " > commit_message.txt
18+ export COMMIT_MESSAGE=$(cat commit_message.txt);
19+ echo "Got commit message:"
20+ echo "${COMMIT_MESSAGE}"
21+ if [[ -v CIRCLE_PULL_REQUEST ]] && ([[ "$COMMIT_MESSAGE" == *"[skip circle]"* ]] || [[ "$COMMIT_MESSAGE" == *"[circle skip]"* ]]); then
22+ echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
23+ circleci-agent step halt;
24+ fi
25+
1226 merge :
1327 steps :
1428 - run :
@@ -24,20 +38,6 @@ commands:
2438 git pull --ff-only upstream "refs/pull/$(cat merge.txt)/merge";
2539 fi
2640
27- check-skip :
28- steps :
29- - run :
30- name : Check-skip
31- command : |
32- git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " " > commit_message.txt
33- export COMMIT_MESSAGE=$(cat commit_message.txt);
34- echo "Got commit message:"
35- echo "${COMMIT_MESSAGE}"
36- if [[ -v CIRCLE_PULL_REQUEST ]] && ([[ "$COMMIT_MESSAGE" == *"[skip circle]"* ]] || [[ "$COMMIT_MESSAGE" == *"[circle skip]"* ]]); then
37- echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
38- circleci-agent step halt;
39- fi
40-
4141 apt-install :
4242 steps :
4343 - run :
You can’t perform that action at this time.
0 commit comments