更改:events回到原来版本

This commit is contained in:
yystopf 2023-04-11 13:58:42 +08:00
parent d59e99feca
commit ef10155387
1 changed files with 1 additions and 6 deletions
app/views/api/v1/projects/webhooks

View File

@ -3,12 +3,7 @@ json.type webhook["type"]
json.content_type webhook['config']['content_type'] json.content_type webhook['config']['content_type']
json.http_method webhook['config']['http_method'] json.http_method webhook['config']['http_method']
json.url webhook['config']['url'] json.url webhook['config']['url']
event = webhook.events json.events 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.active webhook['active'] json.active webhook['active']
json.branch_filter webhook['branch_filter'] json.branch_filter webhook['branch_filter']
json.created_at format_time(webhook['created_at'].to_time) json.created_at format_time(webhook['created_at'].to_time)