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:
OWNERs files come and go, just as directories do
Developers can become OWNERs and then leave as OWNERs,
Handling the OWNER hierarchy of files is going to be tricky.
Here's how we do this:
Given a list that I'll give you of all commits to OWNERS, parse it
For each commit, do a git checkout COMMIT
For each OWNERS file in that tree, get a list of all email addresses mentioned
Keep a hash of OWNER-OWNERFILE (e.g. brett@chromium.org-src/" => [abc123, 'Aug 1 2009']). Keep track of the earliest date for each directory and owner.
Then save it out to a CSV
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:
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:
Some issues to watch out for:
Here's how we do this:
git checkout COMMIT
brett@chromium.org-src/" => [abc123, 'Aug 1 2009']
). Keep track of the earliest date for each directory and owner.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: