bin/pull_req_data_extraction.rb
def at_mentions_comments(pr)
    issue_comments(pr[:login], pr[:project_name], pr[:github_id]).map do |ic|
      # Remove stuff between backticks (they may be code)
      # e.g. see comments in https://github.com/ReactiveX/RxScala/pull/166
      unless ic['body'].nil?
        ic['body'].\
            gsub(/`.*?`/, '').\
            gsub(/[\w]*@[\w]+\.[\w]+/, '')
      else
        0
      end
    end.map do |ic|
      ic.scan(/(@[a-zA-Z0-9]+)/).size
    end.reduce(0) do |acc, x|
      acc + x
    end
  end
# Num of @uname mentions in comments
Num of @uname mentions in comments
Num of @uname mentions in comments
def at_mentions_comments(pr)
    issue_comments(pr[:login], pr[:project_name], pr[:github_id]).map do |ic|
      unless ic['body'].nil?
        ic['body'].\
            gsub(/`.*?`/, '').\
            gsub(/[\w]*@[\w]+\.[\w]+/, '')
      else
        0
      end
    end.map do |ic|
      ic.scan(/(@[a-zA-Z0-9]+)/).size
    end.reduce(0) do |acc, x|
      acc + x
    end
  end
def at_mentions_comments ( pr ) issue_comments ( pr [ :login ] , pr [ :project_name ] , pr [ :github_id ] ) . map do | ic | unless ic [ 'body' ] . nil? ic [ 'body' ] . gsub ( / `.*?` / , '' ) . gsub ( / [ \w ]*@[ \w ]+ \. [ \w ]+ / , '' ) else 0 end end . map do | ic | ic . scan ( / (@[a-zA-Z0-9]+) / ) . size end . reduce ( 0 ) do | acc , x | acc + x end end
Num of @uname mentions in comments
Num of @uname mentions in comments
# Remove stuff between backticks (they may be code) # e.g. see comments in https://github.com/ReactiveX/RxScala/pull/166
pr