File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ if [ -n "$VERCEL_GIT_PULL_REQUEST_ID" ] && [ -n "$GITHUB_TOKEN" ]; then
19
19
API_URL=" https://api.github.com/repos/$VERCEL_GIT_REPO_OWNER /$VERCEL_GIT_REPO_SLUG /pulls/$VERCEL_GIT_PULL_REQUEST_ID "
20
20
echo " API URL: $API_URL "
21
21
22
+ # Debug: Check if token exists (show first 4 chars)
23
+ if [ -n " $GITHUB_TOKEN " ]; then
24
+ echo " GitHub token: ${GITHUB_TOKEN: 0: 4} ..."
25
+ else
26
+ echo " ⚠️ No GitHub token found"
27
+ fi
28
+
22
29
# Get PR info from GitHub API (using grep/sed instead of jq since it's not available in Vercel)
23
30
PR_RESPONSE=$( curl -s -H " Authorization: token $GITHUB_TOKEN " " $API_URL " )
24
31
@@ -32,8 +39,14 @@ if [ -n "$VERCEL_GIT_PULL_REQUEST_ID" ] && [ -n "$GITHUB_TOKEN" ]; then
32
39
echo " ⚠️ GitHub API error: $ERROR_MSG "
33
40
fi
34
41
35
- # Debug: Show first 200 chars of response
36
- echo " Response preview: $( echo " $PR_RESPONSE " | head -c 200) ..."
42
+ # Debug: Look for base.ref in response (show more context)
43
+ echo " Looking for base.ref pattern..."
44
+ echo " $PR_RESPONSE " | grep -o ' "base":[^}]*' | head -c 500
45
+ echo " "
46
+
47
+ # Also try to find just the ref field near base
48
+ echo " Searching for 'base' context..."
49
+ echo " $PR_RESPONSE " | grep -C 2 ' "base"' | head -n 10
37
50
fi
38
51
39
52
# Extract base.ref from JSON using sed (looking for pattern: "base":{"ref":"branch-name")
You can’t perform that action at this time.
0 commit comments