diff --git a/entrypoint.sh b/entrypoint.sh
index 96d268d..8090654 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -2,7 +2,14 @@
 
 set -e
 
-PR_NUMBER=$(jq -r ".issue.number" "$GITHUB_EVENT_PATH")
+PR_NUMBER=$(jq -r ".pull_request.number" "$GITHUB_EVENT_PATH")
+if [[ "$PR_NUMBER" == "null" ]]; then
+	PR_NUMBER=$(jq -r ".issue.number" "$GITHUB_EVENT_PATH")
+fi
+if [[ "$PR_NUMBER" == "null" ]]; then
+	echo "Failed to determine PR Number."
+	exit 1
+fi
 echo "Collecting information about PR #$PR_NUMBER of $GITHUB_REPOSITORY..."
 
 if [[ -z "$GITHUB_TOKEN" ]]; then