Class: Lita::Extensions::GitHubWebHooksCore::Hooks::PullRequestReviewComment

Inherits:
Hook
  • Object
show all
Includes:
RepoHooks
Defined in:
lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb

Instance Attribute Summary

Attributes inherited from Hook

#payload

Instance Method Summary collapse

Methods included from RepoHooks

#access_token, #client, #repo, #repository

Methods inherited from Hook

#initialize

Constructor Details

This class inherits a constructor from Lita::Extensions::GitHubWebHooksCore::Hooks::Hook

Instance Method Details

#attributesObject



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb', line 63

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

#bodyObject



39
40
41
# File 'lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb', line 39

def body
  comment["body"]
end

#candidate_branchObject



31
32
33
# File 'lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb', line 31

def candidate_branch
  pr["head"]["label"]
end

#commentObject



43
44
45
# File 'lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb', line 43

def comment
  payload["comment"]
end

#commenterObject



47
48
49
# File 'lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb', line 47

def commenter
  payload["sender"]["login"]
end

#numberObject



55
56
57
# File 'lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb', line 55

def number
  pr["number"]
end

#pathObject



51
52
53
# File 'lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb', line 51

def path
  comment["path"]
end

#prObject



23
24
25
# File 'lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb', line 23

def pr
  payload["pull_request"]
end

#refObject



59
60
61
# File 'lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb', line 59

def ref
  pr["ref"]
end

#requesterObject



19
20
21
# File 'lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb', line 19

def requester
  payload["sender"]
end

#target_branchObject



27
28
29
# File 'lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb', line 27

def target_branch
  pr["base"]["label"]
end

#urlObject



35
36
37
# File 'lib/lita/extensions/github_web_hooks_core/hooks/pull_request_review_comment.rb', line 35

def url
  pr["html_url"]
end