Sha256: 7a4d831372c98c0d92a2a77666bd27a61f116e126b6213afdb6c8796c6732e19

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

module Lita::Extensions
  module GitHubWebHooksCore
    module Hooks
      class PullRequestReviewComment < Hook
        include Lita::Extensions::GitHubWebHooksCore::Hooks::RepoHooks
        def requester
          payload["sender"]
        end
      
        def pr
          payload["pull_request"]
        end
      
        def target_branch
          pr["base"]["label"]
        end
      
        def candidate_branch
          pr["head"]["label"]
        end
      
        def url
          pr["html_url"]
        end
      
        def body
          comment["body"]
        end
      
        def comment
          payload["comment"]
        end
      
        def commenter
          payload["sender"]["login"]
        end
      
        def path
          comment["path"]
        end
      
        def number
          pr["number"]
        end
      
        def ref
          pr["ref"]
        end
      
        def attributes
          {
            requester: requester,
            pr: pr,
            repo: repo,
            ref: ref,
            path: path,
            number: number,
            target_branch: target_branch,
            candidate_branch: candidate_branch,
            url: url,
            body: body,
            comment: comment,
            commenter: commenter
          }
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lita-github-web-hooks-core-1.0.0 lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb