From c10a9ab0091205a6dfd2182d963874c52b88030b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BB=BA=E5=B9=B3?= Date: Tue, 4 Mar 2025 17:44:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=B6=E7=A7=BB=E9=99=A4gitea?= =?UTF-8?q?=E6=94=AF=E6=8C=81=EF=BC=8C=E7=AD=89=E5=BE=85=E5=AE=98=E6=96=B9?= =?UTF-8?q?=E9=80=82=E9=85=8D=E3=80=82=E4=BC=9F=E5=A4=A7=E7=9A=84=E5=86=B3?= =?UTF-8?q?=E7=AD=96=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/pr/views.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/pr/views.py b/apps/pr/views.py index 8adfec8..23a6509 100644 --- a/apps/pr/views.py +++ b/apps/pr/views.py @@ -40,8 +40,9 @@ class WebHookView(View): """ if git_type == "gitlab": return GitLabProvider() - elif git_type == "gitea": - return GiteaProvider() + # TODO: 暂时官方没适配gitea + # elif git_type == "gitea": + # return GiteaProvider() else: return GitLabProvider() @@ -93,10 +94,11 @@ class WebHookView(View): provider.save_pr_agent_log( request_data=json_data, project_id=project_config.get("project_id") ) - elif GIT_TYPE == "gitea": - if json_data.get("action") == "opened": - provider.save_pr_agent_log( - request_data=json_data, project_id=project_config.get("project_id") - ) + # TODO:暂时官方没适配gitea + # elif GIT_TYPE == "gitea": + # if json_data.get("action") == "opened": + # provider.save_pr_agent_log( + # request_data=json_data, project_id=project_config.get("project_id") + # ) return JsonResponse(status=200, data={"status": "ignored"})