Class: Lita::Extensions::GitHubWebHooksCore::Hooks::Fork

Inherits:
Hook
  • Object
show all
Includes:
RepoHooks
Defined in:
lib/lita/extensions/github_web_hooks_core/hooks/fork.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



28
29
30
31
32
33
34
# File 'lib/lita/extensions/github_web_hooks_core/hooks/fork.rb', line 28

def attributes
  {
    forker: forker,
    source: source,
    target: target
  }
end

#forkerObject



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

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

#sourceObject



22
23
24
# File 'lib/lita/extensions/github_web_hooks_core/hooks/fork.rb', line 22

def source
  payload["forkee"]["full_name"]
end

#targetObject



25
26
27
# File 'lib/lita/extensions/github_web_hooks_core/hooks/fork.rb', line 25

def target
  repo
end