Skip to content

Commit

Permalink
feat: only check_contains_wip_label
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipebros committed Dec 9, 2020
1 parent f4c75f0 commit 56bb189
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ check_contains_wip_label() {
run_ci_when_approved() {
# https://developer.github.com/v3/pulls/reviews/#list-reviews-on-a-pull-request
body=$(curl -sSL -H "${AUTH_HEADER}" -H "${API_HEADER}" "${URI}/repos/${GITHUB_REPOSITORY}/pulls/${number}/reviews?per_page=100")
echo "${body} body"
# reviews=$(echo "$body" | jq -r '.[] | {state: .state} | @base64')
reviews=""
echo "${body} body jq"
reviews=$(echo "$body" | jq -r '.[] | {state: .state} | @base64')

approvals=0

Expand Down Expand Up @@ -96,13 +95,13 @@ run_ci_when_approved() {
}

process() {
run_ci_when_approved
# run_ci_when_approved
check_contains_wip_label
if [[ "$action" == "submitted" ]] && [[ "$state" == "approved" ]]; then
run_ci_when_approved
else
echo "Ignoring event ${action}/${state}"
fi
# if [[ "$action" == "submitted" ]] && [[ "$state" == "approved" ]]; then
# run_ci_when_approved
# else
# echo "Ignoring event ${action}/${state}"
# fi
}

process

0 comments on commit 56bb189

Please sign in to comment.