修复:更改issue评论事件触发逻辑
This commit is contained in:
parent
afa1cdf842
commit
bea2831149
|
@ -52,6 +52,7 @@ class TouchWebhookJob < ApplicationJob
|
|||
comment = issue.comment_journals.find_by_id comment_id
|
||||
sender = User.find_by_id sender_id
|
||||
return if issue.nil? || sender.nil?
|
||||
return if action_type == 'edited' && comment_json.blank?
|
||||
|
||||
issue.project.webhooks.each do |webhook|
|
||||
next unless webhook.events["events"]["issue_comment"]
|
||||
|
@ -66,6 +67,7 @@ class TouchWebhookJob < ApplicationJob
|
|||
sender = User.find_by_id sender_id
|
||||
pull = issue.try(:pull_request)
|
||||
return if pull.nil? || sender.nil?
|
||||
return if action_type == 'edited' && comment_json.blank?
|
||||
|
||||
pull.project.webhooks.each do |webhook|
|
||||
next unless webhook.events["events"]["pull_request_comment"]
|
||||
|
|
|
@ -38,7 +38,7 @@ class Api::V1::Issues::Journals::UpdateService < ApplicationService
|
|||
|
||||
# @信息发送
|
||||
AtmeService.call(current_user, @atme_receivers, @created_journal) unless receivers_login.blank?
|
||||
TouchWebhookJob.perform_later('IssueComment', @issue&.id, @current_user.id, @updated_journal.id, 'edited', @updated_journal.previous_changes.stringify_keys)
|
||||
TouchWebhookJob.perform_later('IssueComment', @issue&.id, @current_user.id, @updated_journal.id, 'edited', @updated_journal.previous_changes.slice(:notes).stringify_keys)
|
||||
|
||||
unlock("Api::V1::Issues::Journals::UpdateService:#{@issue.id}:#{@journal.id}")
|
||||
|
||||
|
|
Loading…
Reference in New Issue