From a69e4e50143b43e5c1aecacd25eea8b3ec32622c Mon Sep 17 00:00:00 2001 From: yystopf Date: Thu, 13 Apr 2023 09:42:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9Awebhook=20client?= =?UTF-8?q?=E9=87=8C=E6=95=B0=E6=8D=AEreload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/webhook/issue_client.rb | 4 ++-- app/services/webhook/issue_comment_client.rb | 6 +++--- app/services/webhook/pull_comment_client.rb | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/services/webhook/issue_client.rb b/app/services/webhook/issue_client.rb index b829f9740..cb6cca843 100644 --- a/app/services/webhook/issue_client.rb +++ b/app/services/webhook/issue_client.rb @@ -7,8 +7,8 @@ class Webhook::IssueClient def initialize(webhook, issue, sender, event, changes={}) @webhook = webhook - @issue = issue - @sender = sender + @issue = issue.reload + @sender = sender.reload @event = event @changes = changes diff --git a/app/services/webhook/issue_comment_client.rb b/app/services/webhook/issue_comment_client.rb index 1881217ec..4d74aa7ca 100644 --- a/app/services/webhook/issue_comment_client.rb +++ b/app/services/webhook/issue_comment_client.rb @@ -6,9 +6,9 @@ class Webhook::IssueCommentClient def initialize(webhook, issue, journal, sender, event, action_type, comment_json={}) @webhook = webhook - @issue = issue - @journal = journal - @sender = sender + @issue = issue.reload + @journal = journal.reload + @sender = sender.reload @event = event @action_type = action_type @comment_json = comment_json diff --git a/app/services/webhook/pull_comment_client.rb b/app/services/webhook/pull_comment_client.rb index dde9d983f..d7be63e8b 100644 --- a/app/services/webhook/pull_comment_client.rb +++ b/app/services/webhook/pull_comment_client.rb @@ -5,9 +5,9 @@ class Webhook::PullCommentClient def initialize(webhook, pull, journal, sender, event, action_type='created', comment_json={}) @webhook = webhook - @pull = pull - @journal = journal - @sender = sender + @pull = pull.reload + @journal = journal.reload + @sender = sender.reload @event = event @action_type = action_type @comment_json = comment_json