Module: Action::Project::ActivateHook::HookConfig

Included in:
Action::Project::ActivateHook, DeactivateHook
Defined in:
app/services/action/project/activate_hook.rb

Constant Summary collapse

HOOK_URL =
'https://inch-ci.org/rebuild'

Instance Method Summary collapse

Instance Method Details

#hook_activate_optionsObject


64
65
66
# File 'app/services/action/project/activate_hook.rb', line 64

def hook_activate_options
  {active: true}
end

#hook_create_optionsObject


60
61
62
# File 'app/services/action/project/activate_hook.rb', line 60

def hook_create_options
  {events: ['push'], active: true}
end

#hook_deactivate_optionsObject


68
69
70
# File 'app/services/action/project/activate_hook.rb', line 68

def hook_deactivate_options
  {active: false}
end

#hook_serviceObject


52
53
54
# File 'app/services/action/project/activate_hook.rb', line 52

def hook_service
  'web'
end

#hook_url_configObject


56
57
58
# File 'app/services/action/project/activate_hook.rb', line 56

def hook_url_config
  {url: HOOK_URL, content_type: 'json'}
end