Spaces:
Running
Running
burtenshaw
commited on
Commit
Β·
ec512db
1
Parent(s):
571cc8c
validate is not PR
Browse files
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 |
-
|
|
|
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)
|