change chain

This commit is contained in:
sylor_huang@126.com
2020-06-09 18:55:09 +08:00
parent d586f526c9
commit 79641e859c
11 changed files with 114 additions and 101 deletions

View File

@@ -1,7 +1,6 @@
class PostChainJob < ApplicationJob
queue_as :default
#注 pull_request的 api文档有问题字段未明确所以暂时关于pr的参数应该有问题。6-8hs
def perform(chain_params)
status = false
chain_type = chain_params[:type].to_s
@@ -10,7 +9,7 @@ class PostChainJob < ApplicationJob
if status
break
else
response = Gitea::Chain::ChainPostService(chain_params)
response = Gitea::Chain::ChainPostService.new(chain_params).call
if response.status == 200
reponse_body = response&.body
messages = reponse_body.present? ? JSON.parse(reponse_body) : "success"