Class: Lita::Extensions::GitHubWebHooksCore::Hooks::Gollum
- Inherits:
-
Hook
- Object
- Hook
- Lita::Extensions::GitHubWebHooksCore::Hooks::Gollum
show all
- Includes:
- RepoHooks
- Defined in:
- lib/lita/extensions/github_web_hooks_core/hooks/gollum.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
28
29
30
31
32
33
34
35
36
|
# File 'lib/lita/extensions/github_web_hooks_core/hooks/gollum.rb', line 28
def attributes
{
author: author,
title: title,
url: url,
repository: repository,
repo: repo
}
end
|
#author ⇒ Object
19
20
21
|
# File 'lib/lita/extensions/github_web_hooks_core/hooks/gollum.rb', line 19
def author
payload["sender"]["login"]
end
|
#title ⇒ Object
22
23
24
|
# File 'lib/lita/extensions/github_web_hooks_core/hooks/gollum.rb', line 22
def title
payload["pages"].first["page_name"]
end
|
#url ⇒ Object
25
26
27
|
# File 'lib/lita/extensions/github_web_hooks_core/hooks/gollum.rb', line 25
def url
payload["pages"].first["html_url"]
end
|