bin/pull_req_data_extraction.rb
def committer_team(pr, months_back)
    q = <<-QUERY
    select distinct(u.login) as committer
    from commits c, project_commits pc, pull_requests pr, users u, pull_request_history prh
    where pr.base_repo_id = pc.project_id
      and not exists (select * from pull_request_commits where commit_id = c.id)
      and pc.commit_id = c.id
      and pr.id = ?
      and u.id = c.committer_id
      and u.fake is false
      and prh.pull_request_id = pr.id
      and prh.action = 'opened'
      and c.created_at > DATE_SUB(prh.created_at, INTERVAL #{months_back} MONTH)
      and c.created_at < prh.created_at;
    QUERY
    db.fetch(q, pr[:id]).all.map{|x| x[:committer]}
  end
# People that committed (not through pull requests) up to months_back
# from the time the PR was created.
People that committed (not through pull requests) up to months_back
from the time the PR was created.
People that committed ( not through pull requests ) up to months_back from the time the PR was created .
def committer_team(pr, months_back)
    q = <<-QUERY
    select distinct(u.login) as committer
    from commits c, project_commits pc, pull_requests pr, users u, pull_request_history prh
    where pr.base_repo_id = pc.project_id
      and not exists (select * from pull_request_commits where commit_id = c.id)
      and pc.commit_id = c.id
      and pr.id = ?
      and u.id = c.committer_id
      and u.fake is false
      and prh.pull_request_id = pr.id
      and prh.action = 'opened'
      and c.created_at > DATE_SUB(prh.created_at, INTERVAL #{months_back} MONTH)
      and c.created_at < prh.created_at;
    QUERY
    db.fetch(q, pr[:id]).all.map{|x| x[:committer]}
  end
def committer_team ( pr , months_back ) q = <<-QUERY 
    select distinct(u.login) as committer
    from commits c, project_commits pc, pull_requests pr, users u, pull_request_history prh
    where pr.base_repo_id = pc.project_id
      and not exists (select * from pull_request_commits where commit_id = c.id)
      and pc.commit_id = c.id
      and pr.id = ?
      and u.id = c.committer_id
      and u.fake is false
      and prh.pull_request_id = pr.id
      and prh.action = 'opened'
      and c.created_at > DATE_SUB(prh.created_at, INTERVAL  #{ months_back }  MONTH)
      and c.created_at < prh.created_at;
     QUERY db . fetch ( q , pr [ :id ] ) . all . map { | x | x [ :committer ] } end
People that committed (not through pull requests) up to months_back
from the time the PR was created.
People that committed ( not through pull requests ) up to months_back from the time the PR was created .
pr
months_back