Skip to content

Commit

Permalink
Fixed bug with USER_LOGIN (cirrus-actions#78)
Browse files Browse the repository at this point in the history
(cherry picked from commit c473b71)
  • Loading branch information
jackton1 authored and xzile committed Apr 19, 2022
1 parent 139f40e commit 5ae1b64
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions entrypoint.sh
Expand Up @@ -50,6 +50,10 @@ BASE_REPO=$(echo "$pr_resp" | jq -r .base.repo.full_name)
BASE_BRANCH=$(echo "$pr_resp" | jq -r .base.ref)

USER_LOGIN=$(jq -r ".comment.user.login" "$GITHUB_EVENT_PATH")

if [[ "$USER_LOGIN" == "null" ]]; then
USER_LOGIN=$(jq -r ".pull_request.user.login" "$GITHUB_EVENT_PATH")
fi

user_resp=$(curl -X GET -s -H "${AUTH_HEADER}" -H "${API_HEADER}" \
"${URI}/users/${USER_LOGIN}")
Expand Down

0 comments on commit 5ae1b64

Please sign in to comment.