paulirish / pwmetrics

Progressive web metrics at your fingertipz
Apache License 2.0
1.25k stars 74 forks source link

Feature Request: Upload Comments to Google Sheets #217

Open jeffbcross opened 5 years ago

jeffbcross commented 5 years ago

Suppose I'm running pwmetrics in a post-merge CI job to track my app's performance over time. I'd like to associate each row of data with the git commit of the code being tested, so I can pinpoint where a regression (or improvement) was introduced.

If I could have an additional option in the sheets options for a comments field that would accept a string or function, I could accomplish this as follows:

module.exports = {
  sheets: {
    type: 'GOOGLE_SHEETS',
    options: {
      comments: () => require('child_process').execSync('git rev-parse --short HEAD').toString()
    }
};

There could be more advanced use cases that would benefit from passing in metadata to the function, but for my particular use case, this simple start would be fine.

I'd be happy to contribute a PR if the feature is approved!

denar90 commented 5 years ago

Hi @jeffbcross, comments feature sounds cool. Great idea 👍