Class: Action::Project::RebuildViaHook

Inherits:
Object
  • Object
show all
Includes:
InchCI::Action
Defined in:
app/services/action/project/rebuild_via_hook.rb

Constant Summary collapse

TRIGGER =
'hook'

Instance Method Summary collapse

Methods included from InchCI::Action

#exposures, included

Constructor Details

#initialize(params) ⇒ RebuildViaHook

Returns a new instance of RebuildViaHook.


12
13
14
15
16
17
18
19
20
# File 'app/services/action/project/rebuild_via_hook.rb', line 12

def initialize(params)
  if params[:payload]
    process_payload JSON[params[:payload]]
  elsif params[:ref]
    process_payload params
  else
    @result = "ERROR"
  end
end