bin/pull_req_data_extraction.rb
# Number of pull request code review comments in pull request
Number of pull request code review comments in pull request
Number of pull request code review comments in pull request
def num_pr_comments(pr)
    q = <<-QUERY
    select count(*) as comment_count
    from pull_request_comments prc
    where prc.pull_request_id = ?
    and prc.created_at < (
      select max(created_at)
      from pull_request_history
      where action = 'closed' and pull_request_id = ?)
    QUERY
    db.fetch(q, pr[:id], pr[:id]).first[:comment_count]
  end
def num_pr_comments ( pr ) q = <<-QUERY 
    select count(*) as comment_count
    from pull_request_comments prc
    where prc.pull_request_id = ?
    and prc.created_at < (
      select max(created_at)
      from pull_request_history
      where action = 'closed' and pull_request_id = ?)
     QUERY db . fetch ( q , pr [ :id ] , pr [ :id ] ) . first [ :comment_count ] end
Number of pull request code review comments in pull request
Number of pull request code review comments in pull request
pr