Skip to content

Commit a0a595f

Browse files
Combining check for title and labels
1 parent 12dc37c commit a0a595f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

entrypoint.sh

+5-7
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ title=$(jq -r ".pull_request.title" "$GITHUB_EVENT_PATH")
1010
labels=$(jq -r ".pull_request.labels" "$GITHUB_EVENT_PATH")
1111

1212
checkForBlockingWords(){
13-
echo "checking ${1}"
14-
15-
if echo $1 | grep -iE 'WIP|do not merge|backend not live'
13+
if echo "${1} ${2}" | grep -iE 'WIP|do not merge|backend not live'
1614
then
17-
exit 1
15+
return 1
1816
else
19-
exit 0
17+
return 0
2018
fi
2119
}
22-
checkForBlockingWords "$title"
23-
checkForBlockingWords "$labels"
20+
21+
checkForBlockingWords "$title" "$labels"

0 commit comments

Comments
 (0)