bin/pull_req_data_extraction.rb
def merger(pr)
    q = <<-QUERY
    select u.login as login
    from issues i, issue_events ie, users u
    where i.pull_request_id = ?
      and ie.issue_id = i.id
      and ie.action = 'merged'
      and u.id = ie.actor_id
    QUERY
    merger = db.fetch(q, pr[:id]).first

    if merger.nil?
      # If the PR was merged, then it is safe to assume that the
      # closer is also the merger
      if not close_reason[pr[:github_id]].nil? and close_reason[pr[:github_id]] != :unknown
        closer(pr)
      else
        nil
      end
    else
      merger[:login]
    end
  end
# Person that first merged the pull request
Person that first merged the pull request
Person that first merged the pull request
def merger(pr)
    q = <<-QUERY
    select u.login as login
    from issues i, issue_events ie, users u
    where i.pull_request_id = ?
      and ie.issue_id = i.id
      and ie.action = 'merged'
      and u.id = ie.actor_id
    QUERY
    merger = db.fetch(q, pr[:id]).first
    if merger.nil?
      if not close_reason[pr[:github_id]].nil? and close_reason[pr[:github_id]] != :unknown
        closer(pr)
      else
        nil
      end
    else
      merger[:login]
    end
  end
def merger ( pr ) q = <<-QUERY 
    select u.login as login
    from issues i, issue_events ie, users u
    where i.pull_request_id = ?
      and ie.issue_id = i.id
      and ie.action = 'merged'
      and u.id = ie.actor_id
     QUERY merger = db . fetch ( q , pr [ :id ] ) . first if merger . nil? if not close_reason [ pr [ :github_id ] ] . nil? and close_reason [ pr [ :github_id ] ] != :unknown closer ( pr ) else nil end else merger [ :login ] end end
Person that first merged the pull request
Person that first merged the pull request
# If the PR was merged, then it is safe to assume that the # closer is also the merger
pr