|
|
@@ -0,0 +1,13 @@
|
|
|
+# 测试基础连接
|
|
|
+curl -I https://api.github.com
|
|
|
+
|
|
|
+# 测试用户信息(验证 token 是否有效)
|
|
|
+curl -H "Authorization: Bearer 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" https://api.github.com/user
|
|
|
+
|
|
|
+# 获取 GitHub token
|
|
|
+gh auth token
|
|
|
+
|
|
|
+# 测试 Copilot API
|
|
|
+curl -H "Authorization: Bearer $(gh auth token)" \
|
|
|
+ -H "Content-Type: application/json" \
|
|
|
+ https://api.github.com/user/copilot/billing
|