burtenshaw commited on
Commit
ec512db
Β·
1 Parent(s): 571cc8c

validate is not PR

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -403,7 +403,9 @@ async def webhook_handler(request: Request, background_tasks: BackgroundTasks):
403
  # Check if this is a discussion comment creation
404
  scope_check = scope == "discussion"
405
  action_check = action == "create"
406
-
 
 
407
  print(f"βœ… scope_check: {scope_check}")
408
  print(f"βœ… action_check: {action_check}")
409
 
@@ -519,4 +521,4 @@ if __name__ == "__main__":
519
  print("πŸš€ Starting HF Tagging Bot...")
520
  print("πŸ“Š Dashboard: http://localhost:7860/gradio")
521
  print("πŸ”— Webhook: http://localhost:7860/webhook")
522
- # uvicorn.run("app:app", host="0.0.0.0", port=7860, reload=True)
 
403
  # Check if this is a discussion comment creation
404
  scope_check = scope == "discussion"
405
  action_check = action == "create"
406
+ not_pr = not payload["discussion"]["isPullRequest"]
407
+ scope_check = scope_check and not_pr
408
+
409
  print(f"βœ… scope_check: {scope_check}")
410
  print(f"βœ… action_check: {action_check}")
411
 
 
521
  print("πŸš€ Starting HF Tagging Bot...")
522
  print("πŸ“Š Dashboard: http://localhost:7860/gradio")
523
  print("πŸ”— Webhook: http://localhost:7860/webhook")
524
+ uvicorn.run("app:app", host="0.0.0.0", port=7860, reload=True)