harvesthealth commited on
Commit
625738b
·
verified ·
1 Parent(s): 070209e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -66,6 +66,21 @@ async def proxy(request: Request):
66
  body = await request.body()
67
  logger.info("Received request: %s", body.decode())
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  # Send to subprocess
70
  logger.info("Sending to subprocess...")
71
  proc.stdin.write(body)
 
66
  body = await request.body()
67
  logger.info("Received request: %s", body.decode())
68
 
69
+ # Token verification for debugging
70
+ import requests
71
+
72
+ token = os.environ.get("GITHUB_PERSONAL_ACCESS_TOKEN")
73
+ if token:
74
+ try:
75
+ response = requests.get("https://api.github.com/user", headers={"Authorization": f"token {token}"})
76
+ if response.status_code == 200:
77
+ logger.info("GitHub token verification successful")
78
+ else:
79
+ logger.error("GitHub token verification failed with status code: %s", response.status_code)
80
+ except Exception as e:
81
+ logger.error("Error verifying GitHub token: %s", str(e))
82
+
83
+
84
  # Send to subprocess
85
  logger.info("Sending to subprocess...")
86
  proc.stdin.write(body)