lib/fourchette/pull_request.rb in fourchette-0.0.1 vs lib/fourchette/pull_request.rb in fourchette-0.0.2

- old
+ new

@@ -1,31 +1,23 @@ class Fourchette::PullRequest include SuckerPunch::Job def perform params callbacks = Fourchette::Callbacks.new(params) - @params = params + fork = Fourchette::Fork.new(params) callbacks.before - case action - when 'synchronize' # new push against the PR + case params['action'] + when 'synchronize' # new push against the PR (updating code, basically) fork.update when 'closed' fork.delete when 'reopened' fork.create when 'opened' fork.create end callbacks.after - end - - def action - @params['action'] - end - - def fork - @fork ||= Fourchette::Fork.new(@params) end end \ No newline at end of file