Class: GHArchive::CommitCommentEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/gh-archive/events.rb

Constant Summary

Constants inherited from Event

Event::IMPLEMENTATIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Event

#actor, #created_at, #initialize, #json, parse, #public?, #repo

Constructor Details

This class inherits a constructor from GHArchive::Event

Class Method Details

.fits?(json) ⇒ Boolean

Returns:

  • (Boolean)


76
77
78
# File 'lib/gh-archive/events.rb', line 76

def self.fits?(json)
    return json['type'] == "CommitCommentEvent"
end

Instance Method Details

#comment_bodyObject



108
109
110
# File 'lib/gh-archive/events.rb', line 108

def comment_body
    @payload['comment']['body']
end

#comment_commit_idObject



104
105
106
# File 'lib/gh-archive/events.rb', line 104

def comment_commit_id
    @payload['comment']['commit_id']
end

#comment_created_atObject



112
113
114
# File 'lib/gh-archive/events.rb', line 112

def comment_created_at
    Time.parse(@payload['comment']['created_at'])
end

#comment_idObject



80
81
82
# File 'lib/gh-archive/events.rb', line 80

def comment_id
    @payload['comment']['id']
end

#comment_lineObject



96
97
98
# File 'lib/gh-archive/events.rb', line 96

def comment_line
    @payload['comment']['line']
end

#comment_pathObject



100
101
102
# File 'lib/gh-archive/events.rb', line 100

def comment_path
    @payload['comment']['path']
end

#comment_positionObject



92
93
94
# File 'lib/gh-archive/events.rb', line 92

def comment_position
    @payload['comment']['position']
end

#comment_updated_atObject



116
117
118
# File 'lib/gh-archive/events.rb', line 116

def comment_updated_at
    Time.parse(@payload['comment']['updated_at'])
end

#comment_urlObject



84
85
86
# File 'lib/gh-archive/events.rb', line 84

def comment_url
    @payload['comment']['url']
end

#comment_userObject



88
89
90
# File 'lib/gh-archive/events.rb', line 88

def comment_user
    User.new(@payload['comment']['author'])
end