mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
add: webhook tasks and test
This commit is contained in:
@@ -2,7 +2,7 @@ json.id @webhook.id
|
||||
json.(@webhook, :id, :http_method, :content_type, :url, :secret, :last_status, :is_active)
|
||||
json.type @webhook.hook_task_type
|
||||
json.create_time Time.at(@webhook.created_unix).strftime("%Y-%m-%d %H:%M:%S")
|
||||
event = JSON.parse(@webhook.events)
|
||||
event = @webhook.events
|
||||
json.branch_filter event["branch_filter"]
|
||||
if event["send_everything"]
|
||||
json.events event["events"].keys
|
||||
|
||||
5
app/views/projects/webhooks/tasks.json.jbuilder
Normal file
5
app/views/projects/webhooks/tasks.json.jbuilder
Normal file
@@ -0,0 +1,5 @@
|
||||
json.total_count @tasks.total_count
|
||||
json.tasks @tasks.each do |task|
|
||||
json.(task, :id, :type, :uuid, :is_succeed, :is_delivered, :payload_content, :request_content, :response_content)
|
||||
json.delivered_time Time.at(task.delivered*10**-9).strftime("%Y-%m-%d %H:%M:%S")
|
||||
end
|
||||
Reference in New Issue
Block a user