)]}'
{
  "commit": "473e3f621c8232eb4bde0a6612919cfc271ee18f",
  "tree": "533e7b4fded83c07099e3fd1babc5d9b20fcde0e",
  "parents": [
    "53ae5af9e5882837df9cf1e5a4cd5af7e56fecd4"
  ],
  "author": {
    "name": "Han Seoul-Oh",
    "email": "laughinghan@gmail.com",
    "time": "Sat Dec 24 17:58:43 2016 -0500"
  },
  "committer": {
    "name": "Han Seoul-Oh",
    "email": "laughinghan@gmail.com",
    "time": "Mon Jan 23 16:14:14 2017 -0800"
  },
  "message": "CI: Convert script/screenshots.js to \"promise chain\" style\n\n...of `wd` (our Node.js client for webdriver)\n\nThere\u0027s fewer indents and callbacks, so it\u0027s more readable overall.\nThere\u0027s still lots of indents though because in order to use info from\nprevious steps, have to use .then() callbacks, promises don\u0027t eliminate\ncallbacks, just uniformize them and in particular, uniformize\nerror-handling:\n\nInstead of all the `if (err) log(err);`s, can have just one .fail()\nhandler at the end of the chain. On the other hand, injecting logging\nsteps in the chain is more annoying, had to define a `willLog()` promise\nto log when each step completes.\n\nWe also use the fancy-ish Q feature .spread() to parallelize getting\nscrollHeight and clientHeight (which requires combining logging steps),\nnot sure if we should be doing more or less of that.\n\nFor convenience, we move assembling the screenshot filename a little\nearlier, to the nearest .then(). Also, unfortunately, we have to\nmanually wrap Node\u0027s filesystem API in a promise; the builtin Promise\nshould be available in Node 4+.\n\nRecommend -w to view diff.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c25a5359c01fdfd04e94bb7dcdc871c0e7846bf8",
      "old_mode": 33188,
      "old_path": "script/screenshots.js",
      "new_id": "e63bf060e28dc9a367ce6749c2e66a3f6247f7b8",
      "new_mode": 33188,
      "new_path": "script/screenshots.js"
    }
  ]
}
