Class: Lita::Extensions::GitHubWebHooksCore::Hooks::TeamAdd

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



25
26
27
28
29
30
31
32
# File 'lib/lita/extensions/github_web_hooks_core/hooks/team_add.rb', line 25

def attributes
  {
    org: org,
    team_name: team_name,
    repository: repository,
    repo: repo
  }
end

#orgObject



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

def org
  payload["organization"]["login"]
end

#team_nameObject



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

def team_name
  payload["team"]["name"]
end