Class: Github::IssueCommentEvent

Inherits:
CommentEvent show all
Defined in:
app/models/github/issue_comment_event.rb

Instance Attribute Summary

Attributes inherited from CommentEvent

#comment, #project, #user

Attributes inherited from Event

#payload

Instance Method Summary collapse

Methods inherited from CommentEvent

#process!

Methods inherited from Event

process!, #process!

Constructor Details

#initialize(payload) ⇒ IssueCommentEvent

Returns a new instance of IssueCommentEvent.



6
7
8
9
# File 'app/models/github/issue_comment_event.rb', line 6

def initialize(payload)
  super
  comment["issue"] = payload.fetch "issue"
end

Instance Method Details

#typeObject



11
12
13
# File 'app/models/github/issue_comment_event.rb', line 11

def type
  @type ||= payload["issue"]["pull_request"] ? "pull" : "issue"
end