Class: Lita::Extensions::GitHubWebHooksCore::Hooks::Push
- Inherits:
-
Hook
- Object
- Hook
- Lita::Extensions::GitHubWebHooksCore::Hooks::Push
show all
- Includes:
- RepoHooks
- Defined in:
- lib/lita/extensions/github_web_hooks_core/hooks/push.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
Instance Method Details
#attributes ⇒ Object
32
33
34
35
36
37
38
39
|
# File 'lib/lita/extensions/github_web_hooks_core/hooks/push.rb', line 32
def attributes
{
committer: committer,
commit_count: commit_count,
repo: repo,
sender: sender
}
end
|
#commit_count ⇒ Object
24
25
26
|
# File 'lib/lita/extensions/github_web_hooks_core/hooks/push.rb', line 24
def commit_count
payload["commits"].length.to_s
end
|
#committer ⇒ Object
20
21
22
|
# File 'lib/lita/extensions/github_web_hooks_core/hooks/push.rb', line 20
def committer
sender["login"]
end
|
#sender ⇒ Object
28
29
30
|
# File 'lib/lita/extensions/github_web_hooks_core/hooks/push.rb', line 28
def sender
payload["sender"]
end
|