From 661d1c2c06b2e22d457df1e44f70b4e3b9dfe629 Mon Sep 17 00:00:00 2001 From: chenjing <28122123@qq.com> Date: Fri, 7 Apr 2023 09:56:33 +0800 Subject: [PATCH] update touch webhook --- app/jobs/touch_webhook_job.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/jobs/touch_webhook_job.rb b/app/jobs/touch_webhook_job.rb index cff8e3aa5..d0d9ad9e3 100644 --- a/app/jobs/touch_webhook_job.rb +++ b/app/jobs/touch_webhook_job.rb @@ -61,9 +61,10 @@ class TouchWebhookJob < ApplicationJob when 'PullRequestComment' 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 + issue = Issue.find_by_id(issue_id) + comment = issue.comment_journals.find_by_id comment_id sender = User.find_by_id sender_id + pull = issue.try(:pull_request) return if pull.nil? || sender.nil? || comment.nil? pull.project.webhooks.each do |webhook|