Skip to content

Commit

Permalink
Combining check for title and labels
Browse files Browse the repository at this point in the history
  • Loading branch information
ParanoidBeing authored Apr 2, 2020
1 parent 12dc37c commit a0a595f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ title=$(jq -r ".pull_request.title" "$GITHUB_EVENT_PATH")
labels=$(jq -r ".pull_request.labels" "$GITHUB_EVENT_PATH")

checkForBlockingWords(){
echo "checking ${1}"

if echo $1 | grep -iE 'WIP|do not merge|backend not live'
if echo "${1} ${2}" | grep -iE 'WIP|do not merge|backend not live'
then
exit 1
return 1
else
exit 0
return 0
fi
}
checkForBlockingWords "$title"
checkForBlockingWords "$labels"

checkForBlockingWords "$title" "$labels"

0 comments on commit a0a595f

Please sign in to comment.