From ef101553875ba9319510c28d0cca2b1d205bd798 Mon Sep 17 00:00:00 2001 From: yystopf Date: Tue, 11 Apr 2023 13:58:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=EF=BC=9Aevents=E5=9B=9E?= =?UTF-8?q?=E5=88=B0=E5=8E=9F=E6=9D=A5=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projects/webhooks/_simple_gitea_detail.json.jbuilder | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/views/api/v1/projects/webhooks/_simple_gitea_detail.json.jbuilder b/app/views/api/v1/projects/webhooks/_simple_gitea_detail.json.jbuilder index 09f9565a4..43d602d1f 100644 --- a/app/views/api/v1/projects/webhooks/_simple_gitea_detail.json.jbuilder +++ b/app/views/api/v1/projects/webhooks/_simple_gitea_detail.json.jbuilder @@ -3,12 +3,7 @@ json.type webhook["type"] json.content_type webhook['config']['content_type'] json.http_method webhook['config']['http_method'] json.url webhook['config']['url'] -event = webhook.events -if event["send_everything"] - json.events event["events"].keys.collect{|i| %w(pull_request issues).include?(i) ? i + "_only" : i} -else - json.events event["events"].select{|k, v| v}.keys.collect{|i| %w(pull_request issues).include?(i) ? i + "_only" : i} -end +json.events webhook["events"] json.active webhook['active'] json.branch_filter webhook['branch_filter'] json.created_at format_time(webhook['created_at'].to_time) \ No newline at end of file