File tree Expand file tree Collapse file tree 1 file changed +35
-4
lines changed
Expand file tree Collapse file tree 1 file changed +35
-4
lines changed Original file line number Diff line number Diff line change 1313 exit 1
1414 else
1515 echo "β
AUTO_MERGE_TOKEN is accessible"
16- # Test basic API access
17- curl -s -H "Authorization: token ${{ secrets.AUTO_MERGE_TOKEN }}" \
18- https://api.github.com/user | jq -r .login || echo "Token validation failed"
19- fi
16+ fi
17+
18+ - name : Test with GitHub CLI
19+ env :
20+ GITHUB_TOKEN : ${{ secrets.AUTO_MERGE_TOKEN }}
21+ run : |
22+ echo "π Testing authentication..."
23+
24+ # Get authenticated user
25+ if USER=$(gh api user --jq .login 2>&1); then
26+ echo "β
Authenticated as: $USER"
27+ else
28+ echo "β Authentication failed: $USER"
29+ exit 1
30+ fi
31+
32+ # Test repository access
33+ echo "π Testing repository access..."
34+ if REPO=$(gh api repos/${{ github.repository }} --jq .full_name 2>&1); then
35+ echo "β
Can access repository: $REPO"
36+ else
37+ echo "β Cannot access repository: $REPO"
38+ exit 1
39+ fi
40+
41+ # Test PR operations
42+ echo "π Testing PR access..."
43+ if PRS=$(gh pr list --repo ${{ github.repository }} --limit 1 2>&1); then
44+ echo "β
Can access pull requests"
45+ else
46+ echo "β Cannot access PRs: $PRS"
47+ exit 1
48+ fi
49+
50+ echo "π All tests passed!"
You canβt perform that action at this time.
0 commit comments