Sha256: 8ba650d3725d1319c0e34288f65af0efe77d9b7f73290e19754111c7c3a915cc

Contents?: true

Size: 468 Bytes

Versions: 3

Compression:

Stored size: 468 Bytes

Contents

class Fourchette::PullRequest
  include SuckerPunch::Job

  def perform params
    callbacks = Fourchette::Callbacks.new(params)
    fork = Fourchette::Fork.new(params)

    callbacks.before_all

    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_all
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fourchette-0.0.8 lib/fourchette/pull_request.rb
fourchette-0.0.7 lib/fourchette/pull_request.rb
fourchette-0.0.6 lib/fourchette/pull_request.rb