andymeneely / chromium-history

Scripts and data related Chromium's history
11 stars 4 forks source link

Write a first-ownership collection script #192

Closed andymeneely closed 9 years ago

andymeneely commented 9 years ago

In lib/scripts write a new data collection script that collects the first time a given developer was added to a directory for OWNERS. We'll use this to compute time-to-ownership (which will be a separate issue).

The output of the script should be a CSV like this:

email directory first-owner-commit
foo@chromium.org crypto/ abcd3234
bar@chromium.org crypto/ 2309c3ff3

Some issues to watch out for:

Here's how we do this:

I used this query to get the list of commits: CommitFilepath.where("filepath LIKE '%/OWNERS' ").pluck(:commit_hash).uniq

Please write this in Ruby. Remember that backticks allow you to execute command line commands and save the input, like this:

out = `git log`
andymeneely commented 9 years ago

Next up: merge into master and finish the verifies.