bin/pull_req_data_extraction.rb
def social_connection?(pr)
    q = <<-QUERY
    select *
    from followers
    where user_id = (
      select min(prh.actor_id)
      from pull_request_history prh
      where prh.pull_request_id = ?
        and prh.action = 'closed'
        )
    and follower_id = (
      select min(prh.actor_id)
      from pull_request_history prh
      where prh.pull_request_id = ?
        and prh.action = 'opened'
        )
    and created_at < (
      select min(created_at)
        from pull_request_history
        where pull_request_id = ?
        and action = 'opened'
    )
    QUERY
    db.fetch(q, pr[:id], pr[:id], pr[:id]).all.size > 0
  end
# Do the contributor and the person that closed the PR follow
# each other?
# Defined in: Tsay, Jason, Laura Dabbish, and James Herbsleb.
# "Influence of social and technical factors for evaluating contribution in GitHub."
# Proceedings of the ICSE 2014
Do the contributor and the person that closed the PR follow
each other.
Defined in: Tsay, Jason, Laura Dabbish, and James Herbsleb.
"Influence of social and technical factors for evaluating contribution in GitHub."
Proceedings of the ICSE 2014
Do the contributor and the person that closed the PR follow each other . Defined in : Tsay Jason Laura Dabbish and James Herbsleb . " Influence of social and technical factors for evaluating contribution in GitHub . " Proceedings of the ICSE 2014
def social_connection?(pr)
    q = <<-QUERY
    select *
    from followers
    where user_id = (
      select min(prh.actor_id)
      from pull_request_history prh
      where prh.pull_request_id = ?
        and prh.action = 'closed'
        )
    and follower_id = (
      select min(prh.actor_id)
      from pull_request_history prh
      where prh.pull_request_id = ?
        and prh.action = 'opened'
        )
    and created_at < (
      select min(created_at)
        from pull_request_history
        where pull_request_id = ?
        and action = 'opened'
    )
    QUERY
    db.fetch(q, pr[:id], pr[:id], pr[:id]).all.size > 0
  end
def social_connection? ( pr ) q = <<-QUERY 
    select *
    from followers
    where user_id = (
      select min(prh.actor_id)
      from pull_request_history prh
      where prh.pull_request_id = ?
        and prh.action = 'closed'
        )
    and follower_id = (
      select min(prh.actor_id)
      from pull_request_history prh
      where prh.pull_request_id = ?
        and prh.action = 'opened'
        )
    and created_at < (
      select min(created_at)
        from pull_request_history
        where pull_request_id = ?
        and action = 'opened'
    )
     QUERY db . fetch ( q , pr [ :id ] , pr [ :id ] , pr [ :id ] ) . all . size > 0 end
Do the contributor and the person that closed the PR follow
each other?
Do the contributor and the person that closed the PR follow each other?
pr