{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/addons-validator/pulls/comments/40768642","id":40768642,"diff_hunk":"@@ -0,0 +1,64 @@\n+import * as fs from 'fs';\n+import Xpi from  'xpi';\n+\n+import promisify from 'es6-promisify';\n+import chalk from 'chalk';\n+\n+export var lstat = promisify(fs.lstat);\n+\n+\n+export default class Validator {\n+\n+  constructor(config) {\n+    this.config = config;\n+    this.packagePath = config._[0];\n+    this.xpi;\n+    this.chalk = new chalk.constructor(\n+      {enabled: !this.config.boring});\n+  }\n+\n+  handleError(err) {\n+    if (this.config.stack === true) {","path":"src/validator.js","position":21,"original_position":21,"commit_id":"35252166b2d03930fa1f2cf8e623bb358e3dbd51","original_commit_id":"35252166b2d03930fa1f2cf8e623bb358e3dbd51","user":{"login":"muffinresearch","id":1514,"avatar_url":"https://avatars.githubusercontent.com/u/1514?v=3","gravatar_id":"","url":"https://api.github.com/users/muffinresearch","html_url":"https://github.com/muffinresearch","followers_url":"https://api.github.com/users/muffinresearch/followers","following_url":"https://api.github.com/users/muffinresearch/following{/other_user}","gists_url":"https://api.github.com/users/muffinresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/muffinresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muffinresearch/subscriptions","organizations_url":"https://api.github.com/users/muffinresearch/orgs","repos_url":"https://api.github.com/users/muffinresearch/repos","events_url":"https://api.github.com/users/muffinresearch/events{/privacy}","received_events_url":"https://api.github.com/users/muffinresearch/received_events","type":"User","site_admin":false},"body":"I'm not sure if that's a thing we particularly adhered to in payments, but I definitely tend to default using explicit comparisons over truthy/falsey ones. ","created_at":"2015-09-30T08:20:13Z","updated_at":"2015-09-30T08:20:13Z","html_url":"https://github.com/mozilla/addons-validator/pull/26#discussion_r40768642","pull_request_url":"https://api.github.com/repos/mozilla/addons-validator/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/mozilla/addons-validator/pulls/comments/40768642"},"html":{"href":"https://github.com/mozilla/addons-validator/pull/26#discussion_r40768642"},"pull_request":{"href":"https://api.github.com/repos/mozilla/addons-validator/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/addons-validator/pulls/26","id":46310532,"html_url":"https://github.com/mozilla/addons-validator/pull/26","diff_url":"https://github.com/mozilla/addons-validator/pull/26.diff","patch_url":"https://github.com/mozilla/addons-validator/pull/26.patch","issue_url":"https://api.github.com/repos/mozilla/addons-validator/issues/26","number":26,"state":"open","locked":false,"title":"Add basic zip handling from the CLI","user":{"login":"muffinresearch","id":1514,"avatar_url":"https://avatars.githubusercontent.com/u/1514?v=3","gravatar_id":"","url":"https://api.github.com/users/muffinresearch","html_url":"https://github.com/muffinresearch","followers_url":"https://api.github.com/users/muffinresearch/followers","following_url":"https://api.github.com/users/muffinresearch/following{/other_user}","gists_url":"https://api.github.com/users/muffinresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/muffinresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muffinresearch/subscriptions","organizations_url":"https://api.github.com/users/muffinresearch/orgs","repos_url":"https://api.github.com/users/muffinresearch/repos","events_url":"https://api.github.com/users/muffinresearch/events{/privacy}","received_events_url":"https://api.github.com/users/muffinresearch/received_events","type":"User","site_admin":false},"body":"* Hooks up zip handling to the cli. \r\n* Checks file exists\r\n* Parses the zip.\r\n* Adds colors + turns them off when --boring is passed.\r\n\r\nNext up is starting to validate the layout + work out some of the structure for errors.\r\n\r\n<img alt=\"1__bash\" src=\"https://cloud.githubusercontent.com/assets/1514/10173524/9b69f440-66dc-11e5-83f0-4863734c255c.png\">\r\n","created_at":"2015-09-29T18:01:03Z","updated_at":"2015-09-30T08:20:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfc515e5ea19df8e390d5380e4e4a0f83ce5c988","assignee":{"login":"muffinresearch","id":1514,"avatar_url":"https://avatars.githubusercontent.com/u/1514?v=3","gravatar_id":"","url":"https://api.github.com/users/muffinresearch","html_url":"https://github.com/muffinresearch","followers_url":"https://api.github.com/users/muffinresearch/followers","following_url":"https://api.github.com/users/muffinresearch/following{/other_user}","gists_url":"https://api.github.com/users/muffinresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/muffinresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muffinresearch/subscriptions","organizations_url":"https://api.github.com/users/muffinresearch/orgs","repos_url":"https://api.github.com/users/muffinresearch/repos","events_url":"https://api.github.com/users/muffinresearch/events{/privacy}","received_events_url":"https://api.github.com/users/muffinresearch/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/addons-validator/pulls/26/commits","review_comments_url":"https://api.github.com/repos/mozilla/addons-validator/pulls/26/comments","review_comment_url":"https://api.github.com/repos/mozilla/addons-validator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/addons-validator/issues/26/comments","statuses_url":"https://api.github.com/repos/mozilla/addons-validator/statuses/35252166b2d03930fa1f2cf8e623bb358e3dbd51","head":{"label":"muffinresearch:hook-up-zip-handling","ref":"hook-up-zip-handling","sha":"35252166b2d03930fa1f2cf8e623bb358e3dbd51","user":{"login":"muffinresearch","id":1514,"avatar_url":"https://avatars.githubusercontent.com/u/1514?v=3","gravatar_id":"","url":"https://api.github.com/users/muffinresearch","html_url":"https://github.com/muffinresearch","followers_url":"https://api.github.com/users/muffinresearch/followers","following_url":"https://api.github.com/users/muffinresearch/following{/other_user}","gists_url":"https://api.github.com/users/muffinresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/muffinresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muffinresearch/subscriptions","organizations_url":"https://api.github.com/users/muffinresearch/orgs","repos_url":"https://api.github.com/users/muffinresearch/repos","events_url":"https://api.github.com/users/muffinresearch/events{/privacy}","received_events_url":"https://api.github.com/users/muffinresearch/received_events","type":"User","site_admin":false},"repo":{"id":42520293,"name":"addons-validator","full_name":"muffinresearch/addons-validator","owner":{"login":"muffinresearch","id":1514,"avatar_url":"https://avatars.githubusercontent.com/u/1514?v=3","gravatar_id":"","url":"https://api.github.com/users/muffinresearch","html_url":"https://github.com/muffinresearch","followers_url":"https://api.github.com/users/muffinresearch/followers","following_url":"https://api.github.com/users/muffinresearch/following{/other_user}","gists_url":"https://api.github.com/users/muffinresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/muffinresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muffinresearch/subscriptions","organizations_url":"https://api.github.com/users/muffinresearch/orgs","repos_url":"https://api.github.com/users/muffinresearch/repos","events_url":"https://api.github.com/users/muffinresearch/events{/privacy}","received_events_url":"https://api.github.com/users/muffinresearch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/muffinresearch/addons-validator","description":"The amo-validator, JS edition.","fork":true,"url":"https://api.github.com/repos/muffinresearch/addons-validator","forks_url":"https://api.github.com/repos/muffinresearch/addons-validator/forks","keys_url":"https://api.github.com/repos/muffinresearch/addons-validator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/muffinresearch/addons-validator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/muffinresearch/addons-validator/teams","hooks_url":"https://api.github.com/repos/muffinresearch/addons-validator/hooks","issue_events_url":"https://api.github.com/repos/muffinresearch/addons-validator/issues/events{/number}","events_url":"https://api.github.com/repos/muffinresearch/addons-validator/events","assignees_url":"https://api.github.com/repos/muffinresearch/addons-validator/assignees{/user}","branches_url":"https://api.github.com/repos/muffinresearch/addons-validator/branches{/branch}","tags_url":"https://api.github.com/repos/muffinresearch/addons-validator/tags","blobs_url":"https://api.github.com/repos/muffinresearch/addons-validator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/muffinresearch/addons-validator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/muffinresearch/addons-validator/git/refs{/sha}","trees_url":"https://api.github.com/repos/muffinresearch/addons-validator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/muffinresearch/addons-validator/statuses/{sha}","languages_url":"https://api.github.com/repos/muffinresearch/addons-validator/languages","stargazers_url":"https://api.github.com/repos/muffinresearch/addons-validator/stargazers","contributors_url":"https://api.github.com/repos/muffinresearch/addons-validator/contributors","subscribers_url":"https://api.github.com/repos/muffinresearch/addons-validator/subscribers","subscription_url":"https://api.github.com/repos/muffinresearch/addons-validator/subscription","commits_url":"https://api.github.com/repos/muffinresearch/addons-validator/commits{/sha}","git_commits_url":"https://api.github.com/repos/muffinresearch/addons-validator/git/commits{/sha}","comments_url":"https://api.github.com/repos/muffinresearch/addons-validator/comments{/number}","issue_comment_url":"https://api.github.com/repos/muffinresearch/addons-validator/issues/comments{/number}","contents_url":"https://api.github.com/repos/muffinresearch/addons-validator/contents/{+path}","compare_url":"https://api.github.com/repos/muffinresearch/addons-validator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/muffinresearch/addons-validator/merges","archive_url":"https://api.github.com/repos/muffinresearch/addons-validator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/muffinresearch/addons-validator/downloads","issues_url":"https://api.github.com/repos/muffinresearch/addons-validator/issues{/number}","pulls_url":"https://api.github.com/repos/muffinresearch/addons-validator/pulls{/number}","milestones_url":"https://api.github.com/repos/muffinresearch/addons-validator/milestones{/number}","notifications_url":"https://api.github.com/repos/muffinresearch/addons-validator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/muffinresearch/addons-validator/labels{/name}","releases_url":"https://api.github.com/repos/muffinresearch/addons-validator/releases{/id}","created_at":"2015-09-15T13:14:50Z","updated_at":"2015-09-14T22:18:36Z","pushed_at":"2015-09-29T17:59:54Z","git_url":"git://github.com/muffinresearch/addons-validator.git","ssh_url":"git@github.com:muffinresearch/addons-validator.git","clone_url":"https://github.com/muffinresearch/addons-validator.git","svn_url":"https://github.com/muffinresearch/addons-validator","homepage":null,"size":89,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"4453fd930c84040beb408c132dad00b58f3b4e1d","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":42436885,"name":"addons-validator","full_name":"mozilla/addons-validator","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/addons-validator","description":"The new Firefox Add-ons validator, written in ES6/JavaScript.","fork":false,"url":"https://api.github.com/repos/mozilla/addons-validator","forks_url":"https://api.github.com/repos/mozilla/addons-validator/forks","keys_url":"https://api.github.com/repos/mozilla/addons-validator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/addons-validator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/addons-validator/teams","hooks_url":"https://api.github.com/repos/mozilla/addons-validator/hooks","issue_events_url":"https://api.github.com/repos/mozilla/addons-validator/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/addons-validator/events","assignees_url":"https://api.github.com/repos/mozilla/addons-validator/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/addons-validator/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/addons-validator/tags","blobs_url":"https://api.github.com/repos/mozilla/addons-validator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/addons-validator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/addons-validator/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/addons-validator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/addons-validator/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/addons-validator/languages","stargazers_url":"https://api.github.com/repos/mozilla/addons-validator/stargazers","contributors_url":"https://api.github.com/repos/mozilla/addons-validator/contributors","subscribers_url":"https://api.github.com/repos/mozilla/addons-validator/subscribers","subscription_url":"https://api.github.com/repos/mozilla/addons-validator/subscription","commits_url":"https://api.github.com/repos/mozilla/addons-validator/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/addons-validator/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/addons-validator/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/addons-validator/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/addons-validator/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/addons-validator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/addons-validator/merges","archive_url":"https://api.github.com/repos/mozilla/addons-validator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/addons-validator/downloads","issues_url":"https://api.github.com/repos/mozilla/addons-validator/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/addons-validator/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/addons-validator/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/addons-validator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/addons-validator/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/addons-validator/releases{/id}","created_at":"2015-09-14T08:34:44Z","updated_at":"2015-09-25T18:07:39Z","pushed_at":"2015-09-29T18:01:03Z","git_url":"git://github.com/mozilla/addons-validator.git","ssh_url":"git@github.com:mozilla/addons-validator.git","clone_url":"https://github.com/mozilla/addons-validator.git","svn_url":"https://github.com/mozilla/addons-validator","homepage":"","size":363,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":13,"forks":1,"open_issues":13,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/addons-validator/pulls/26"},"html":{"href":"https://github.com/mozilla/addons-validator/pull/26"},"issue":{"href":"https://api.github.com/repos/mozilla/addons-validator/issues/26"},"comments":{"href":"https://api.github.com/repos/mozilla/addons-validator/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/addons-validator/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/addons-validator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/addons-validator/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/addons-validator/statuses/35252166b2d03930fa1f2cf8e623bb358e3dbd51"}}}}