From ccede16716d98a0ac01fb05fbae74fb0cf8b64ef Mon Sep 17 00:00:00 2001 From: yystopf Date: Tue, 11 Apr 2023 14:41:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=EF=BC=9Aevents=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/v1/projects/webhooks/_simple_gitea_detail.json.jbuilder | 2 +- app/views/projects/webhooks/create.json.jbuilder | 2 +- 2 files changed, 2 insertions(+), 2 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 43d602d1f..1eab68518 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,7 +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'] -json.events webhook["events"] +json.events webhook["events"].collect{|i| %w(pull_request issues).include?(i) ? i + "_only" : i} 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 diff --git a/app/views/projects/webhooks/create.json.jbuilder b/app/views/projects/webhooks/create.json.jbuilder index 6d6dde31f..26ccd52fa 100644 --- a/app/views/projects/webhooks/create.json.jbuilder +++ b/app/views/projects/webhooks/create.json.jbuilder @@ -2,6 +2,6 @@ json.id @webhook["id"] json.type @webhook["type"] json.content_type @webhook["config"]["content_type"] json.url @webhook["config"]["url"] -json.events @webhook["events"] +json.events @webhook["events"].collect{|i| %w(pull_request issues).include?(i) ? i + "_only" : i} json.active @webhook["active"] json.create_time @webhook["created_at"].to_time.strftime("%Y-%m-%d %H:%M:%S") \ No newline at end of file