File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Test Org Tokens
2+
3+ on :
4+ workflow_dispatch :
5+
6+ jobs :
7+ test-tokens :
8+ runs-on : ubuntu-latest
9+ strategy :
10+ matrix :
11+ token_name :
12+ - RENOVATE_TOKEN
13+ - GH_PUBLISH_TOKEN
14+ - SCORE_BOT_PAT
15+ steps :
16+ - name : Test token ${{ matrix.token_name }}
17+ env :
18+ TOKEN : ${{ secrets[matrix.token_name] }}
19+ TOKEN_NAME : ${{ matrix.token_name }}
20+ run : |
21+ echo "🔎 Testing token: $TOKEN_NAME"
22+
23+ echo "==> /user"
24+ curl -s -H "Authorization: token $TOKEN" https://api.github.com/user | jq '{login, id}'
25+
26+ echo "==> Token scopes"
27+ curl -sI -H "Authorization: token $TOKEN" https://api.github.com/user | grep x-oauth-scopes || true
28+
29+ echo "==> Try PR reviews API"
30+ STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
31+ -H "Authorization: token $TOKEN" \
32+ https://api.github.com/repos/qorix-group/sccache_server_image/pulls/1/reviews)
33+ echo "PR Reviews: $STATUS"
34+
35+ echo "==> Try team members API"
36+ STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
37+ -H "Authorization: token $TOKEN" \
38+ https://api.github.com/orgs/qorix-group/teams/qorix-reviewers/members)
39+ echo "Team Members: $STATUS"
You can’t perform that action at this time.
0 commit comments