Class: Lita::Extensions::GitHubWebHooksCore::Hooks::Deployment

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



43
44
45
46
47
48
49
50
51
52
53
# File 'lib/lita/extensions/github_web_hooks_core/hooks/deployment.rb', line 43

def attributes
{
  sha: sha,
  ref: ref,
  repo: repo,
  environment: environment,
  start_time: start_time,
  deploy: deploy,
  deployer: deployer
}
end

#deployObject



31
32
33
# File 'lib/lita/extensions/github_web_hooks_core/hooks/deployment.rb', line 31

def deploy
  payload["deployment"]
end

#deployerObject



35
36
37
# File 'lib/lita/extensions/github_web_hooks_core/hooks/deployment.rb', line 35

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

#environmentObject



23
24
25
# File 'lib/lita/extensions/github_web_hooks_core/hooks/deployment.rb', line 23

def environment
  deploy["environment"]
end

#refObject



39
40
41
# File 'lib/lita/extensions/github_web_hooks_core/hooks/deployment.rb', line 39

def ref
  deploy["ref"]
end

#shaObject



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

def sha
  deploy["sha"]
end

#start_timeObject



27
28
29
# File 'lib/lita/extensions/github_web_hooks_core/hooks/deployment.rb', line 27

def start_time
  deploy["created_at"]
end