fix: python code and Laura's container mismatch
This commit is contained in:
@ -66,8 +66,13 @@ def audit_submission(round_number: int):
|
||||
return jsonify({"success": True, "data": {"is_approved": False}}), 200
|
||||
|
||||
try:
|
||||
is_approved = audit_repo(pr_url)
|
||||
return jsonify({"success": True, "data": {"is_approved": is_approved}}), 200
|
||||
result = audit_repo(pr_url)
|
||||
return jsonify(result), 200
|
||||
except Exception as e:
|
||||
logger.error(f"Error auditing PR: {str(e)}")
|
||||
return jsonify({"success": True, "data": {"is_approved": True}}), 200
|
||||
return jsonify({
|
||||
"success": False,
|
||||
"data": {
|
||||
"error": str(e)
|
||||
}
|
||||
}), 500
|
||||
|
@ -34,8 +34,7 @@ def audit_repo(pr_url):
|
||||
|
||||
# Run workflow and get result
|
||||
result = repo_summerizer_audit_workflow.run()
|
||||
recommendation = result["data"]["recommendation"]
|
||||
return recommendation
|
||||
return result
|
||||
except Exception as e:
|
||||
logger.error(f"PR review failed: {str(e)}")
|
||||
raise Exception("PR review failed")
|
||||
|
@ -137,7 +137,7 @@ class repoSummarizerAuditWorkflow(Workflow):
|
||||
"success": False,
|
||||
"message": "Readme file check failed",
|
||||
"data": {
|
||||
"recommendation": False,
|
||||
"is_approved": False,
|
||||
},
|
||||
}
|
||||
log_section("Readme file check completed")
|
||||
@ -151,7 +151,7 @@ class repoSummarizerAuditWorkflow(Workflow):
|
||||
"success": True,
|
||||
"message": "Readme file check completed",
|
||||
"data": {
|
||||
"recommendation": recommendation == "APPROVE",
|
||||
"is_approved": recommendation == "APPROVE",
|
||||
},
|
||||
}
|
||||
except Exception as e:
|
||||
@ -161,6 +161,6 @@ class repoSummarizerAuditWorkflow(Workflow):
|
||||
"success": False,
|
||||
"message": f"Readme file check workflow failed: {str(e)}",
|
||||
"data": {
|
||||
"recommendation": False,
|
||||
"is_approved": False,
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user