update pr model and webhook

This commit is contained in:
chenjing
2023-04-07 09:50:35 +08:00
committed by yystopf
parent cd489d3b97
commit 39c2166c12
2 changed files with 24 additions and 5 deletions

View File

@@ -60,8 +60,8 @@ class TouchWebhookJob < ApplicationJob
end
when 'PullRequestComment'
pull_id, sender_id, comment_id = args[0], args[1], args[2]
pull = PullRequest.find_by_id pull_id
issue_id, sender_id, comment_id = args[0], args[1], args[2]
pull = Issue.find_by_id(issue_id).try(:pull_request)
comment = pull.issue.comment_journals.find_by_id comment_id
sender = User.find_by_id sender_id
return if pull.nil? || sender.nil? || comment.nil?