Browse Source

新增:webhook client里数据reload

pull/342/head
yystopf 3 years ago
parent
commit
a69e4e5014
3 changed files with 8 additions and 8 deletions
  1. +2
    -2
      app/services/webhook/issue_client.rb
  2. +3
    -3
      app/services/webhook/issue_comment_client.rb
  3. +3
    -3
      app/services/webhook/pull_comment_client.rb

+ 2
- 2
app/services/webhook/issue_client.rb View File

@@ -7,8 +7,8 @@ class Webhook::IssueClient


def initialize(webhook, issue, sender, event, changes={}) def initialize(webhook, issue, sender, event, changes={})
@webhook = webhook @webhook = webhook
@issue = issue
@sender = sender
@issue = issue.reload
@sender = sender.reload
@event = event @event = event
@changes = changes @changes = changes




+ 3
- 3
app/services/webhook/issue_comment_client.rb View File

@@ -6,9 +6,9 @@ class Webhook::IssueCommentClient


def initialize(webhook, issue, journal, sender, event, action_type, comment_json={}) def initialize(webhook, issue, journal, sender, event, action_type, comment_json={})
@webhook = webhook @webhook = webhook
@issue = issue
@journal = journal
@sender = sender
@issue = issue.reload
@journal = journal.reload
@sender = sender.reload
@event = event @event = event
@action_type = action_type @action_type = action_type
@comment_json = comment_json @comment_json = comment_json


+ 3
- 3
app/services/webhook/pull_comment_client.rb View File

@@ -5,9 +5,9 @@ class Webhook::PullCommentClient


def initialize(webhook, pull, journal, sender, event, action_type='created', comment_json={}) def initialize(webhook, pull, journal, sender, event, action_type='created', comment_json={})
@webhook = webhook @webhook = webhook
@pull = pull
@journal = journal
@sender = sender
@pull = pull.reload
@journal = journal.reload
@sender = sender.reload
@event = event @event = event
@action_type = action_type @action_type = action_type
@comment_json = comment_json @comment_json = comment_json


Loading…
Cancel
Save