Sha256: dc3ce77556b40104f51bf440afa42569124c2fcdee4b93cdb222560a5b69c189
Contents?: true
Size: 1017 Bytes
Versions: 3
Compression:
Stored size: 1017 Bytes
Contents
module Octospy class Parser module PullRequest def parse_pull_request_event { status: "#{@event.payload.action} pull request ##{@event.payload.number}", title: @event.payload.pull_request.title, body: "#{@event.payload.pull_request.body}".split_lfbl, link: @event.payload.pull_request.html_url } end def parse_pull_request_review_comment_event if @event.payload.comment.pull_request_url url = @event.payload.comment.pull_request_url pull_id = url.match(/\/pulls\/([0-9]+)/)[1] pull = Octokit.pull(@event.repo.name, pull_id) title = "#{pull.title}: #{@event.payload.comment.path}" else title = @event.payload.comment.path end { status: "commented on pull request", title: title, body: "#{@event.payload.comment.body}".split_lfbl, link: @event.payload.comment._links.html.href } end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
octospy-0.0.3 | lib/octospy/parser/pull_request.rb |
octospy-0.0.2 | lib/octospy/parser/pull_request.rb |
octospy-0.0.1 | lib/octospy/parser/pull_request.rb |