Class: Lita::Extensions::GitHubWebHooksCore::Hooks::Create

Inherits:
Hook
  • Object
show all
Includes:
RepoHooks
Defined in:
lib/lita/extensions/github_web_hooks_core/hooks/create.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
35
36
# File 'lib/lita/extensions/github_web_hooks_core/hooks/create.rb', line 28

def attributes
  {
    creator: creator,
    creation: creation,
    creation_name: creation_name,
    repository: repository,
    repo: repo
  }
end

#creationObject



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

def creation
  payload["ref_type"]
end

#creation_nameObject



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

def creation_name
  payload["ref"]
end

#creatorObject



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

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