{"action":"closed","number":339,"pull_request":{"url":"https://api.github.com/repos/mozilla/chronicle/pulls/339","id":29312494,"html_url":"https://github.com/mozilla/chronicle/pull/339","diff_url":"https://github.com/mozilla/chronicle/pull/339.diff","patch_url":"https://github.com/mozilla/chronicle/pull/339.patch","issue_url":"https://api.github.com/repos/mozilla/chronicle/issues/339","number":339,"state":"closed","locked":false,"title":"chore(build): replace precommit-hook with husky for auto linting","user":{"login":"pdehaan","id":557895,"avatar_url":"https://avatars.githubusercontent.com/u/557895?v=3","gravatar_id":"","url":"https://api.github.com/users/pdehaan","html_url":"https://github.com/pdehaan","followers_url":"https://api.github.com/users/pdehaan/followers","following_url":"https://api.github.com/users/pdehaan/following{/other_user}","gists_url":"https://api.github.com/users/pdehaan/gists{/gist_id}","starred_url":"https://api.github.com/users/pdehaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdehaan/subscriptions","organizations_url":"https://api.github.com/users/pdehaan/orgs","repos_url":"https://api.github.com/users/pdehaan/repos","events_url":"https://api.github.com/users/pdehaan/events{/privacy}","received_events_url":"https://api.github.com/users/pdehaan/received_events","type":"User","site_admin":false},"body":"Replacing **precommit-hook** module with [**husky**](https://www.npmjs.com/package/husky) so we can remove some sketchy automated JSHint logic included in **precommit-hook** and convert the hook from \"pre-commit\" to \"pre-push\". See https://github.com/mozilla/chronicle/issues/322 for some more context.\r\n\r\nThis doesn't address the core issue of #322 (_\"git pre-commit linter should only run on files in the git index\"_), but should give a slight performance bump (if you like to `git commit` a lot and `git push` a little).\r\n\r\n### How do I even?\r\n\r\nTo install/test this, I recommend cleaning out any existing git hooks in your ./.git/hooks/ directory that may have been set up by **precommit-hook** _before_ running `npm install`. The **husky** npm install will recreate any hooks that it watches (notably \"precommit\", \"prepush\", and \"postmerge\").\r\n","created_at":"2015-02-14T01:20:44Z","updated_at":"2015-02-17T22:30:03Z","closed_at":"2015-02-17T22:30:02Z","merged_at":"2015-02-17T22:30:02Z","merge_commit_sha":"a26f5ea16b787cfa57122cf0110a1a6d3917df5e","assignee":{"login":"6a68","id":96396,"avatar_url":"https://avatars.githubusercontent.com/u/96396?v=3","gravatar_id":"","url":"https://api.github.com/users/6a68","html_url":"https://github.com/6a68","followers_url":"https://api.github.com/users/6a68/followers","following_url":"https://api.github.com/users/6a68/following{/other_user}","gists_url":"https://api.github.com/users/6a68/gists{/gist_id}","starred_url":"https://api.github.com/users/6a68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6a68/subscriptions","organizations_url":"https://api.github.com/users/6a68/orgs","repos_url":"https://api.github.com/users/6a68/repos","events_url":"https://api.github.com/users/6a68/events{/privacy}","received_events_url":"https://api.github.com/users/6a68/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/chronicle/pulls/339/commits","review_comments_url":"https://api.github.com/repos/mozilla/chronicle/pulls/339/comments","review_comment_url":"https://api.github.com/repos/mozilla/chronicle/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/chronicle/issues/339/comments","statuses_url":"https://api.github.com/repos/mozilla/chronicle/statuses/ba5c91272fa6f72d382b177f6664a48e6446cd5e","head":{"label":"pdehaan:precommit-husky","ref":"precommit-husky","sha":"ba5c91272fa6f72d382b177f6664a48e6446cd5e","user":{"login":"pdehaan","id":557895,"avatar_url":"https://avatars.githubusercontent.com/u/557895?v=3","gravatar_id":"","url":"https://api.github.com/users/pdehaan","html_url":"https://github.com/pdehaan","followers_url":"https://api.github.com/users/pdehaan/followers","following_url":"https://api.github.com/users/pdehaan/following{/other_user}","gists_url":"https://api.github.com/users/pdehaan/gists{/gist_id}","starred_url":"https://api.github.com/users/pdehaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdehaan/subscriptions","organizations_url":"https://api.github.com/users/pdehaan/orgs","repos_url":"https://api.github.com/users/pdehaan/repos","events_url":"https://api.github.com/users/pdehaan/events{/privacy}","received_events_url":"https://api.github.com/users/pdehaan/received_events","type":"User","site_admin":false},"repo":{"id":27936821,"name":"chronicle-1","full_name":"pdehaan/chronicle-1","owner":{"login":"pdehaan","id":557895,"avatar_url":"https://avatars.githubusercontent.com/u/557895?v=3","gravatar_id":"","url":"https://api.github.com/users/pdehaan","html_url":"https://github.com/pdehaan","followers_url":"https://api.github.com/users/pdehaan/followers","following_url":"https://api.github.com/users/pdehaan/following{/other_user}","gists_url":"https://api.github.com/users/pdehaan/gists{/gist_id}","starred_url":"https://api.github.com/users/pdehaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdehaan/subscriptions","organizations_url":"https://api.github.com/users/pdehaan/orgs","repos_url":"https://api.github.com/users/pdehaan/repos","events_url":"https://api.github.com/users/pdehaan/events{/privacy}","received_events_url":"https://api.github.com/users/pdehaan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pdehaan/chronicle-1","description":"find everything you've ever found","fork":true,"url":"https://api.github.com/repos/pdehaan/chronicle-1","forks_url":"https://api.github.com/repos/pdehaan/chronicle-1/forks","keys_url":"https://api.github.com/repos/pdehaan/chronicle-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pdehaan/chronicle-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pdehaan/chronicle-1/teams","hooks_url":"https://api.github.com/repos/pdehaan/chronicle-1/hooks","issue_events_url":"https://api.github.com/repos/pdehaan/chronicle-1/issues/events{/number}","events_url":"https://api.github.com/repos/pdehaan/chronicle-1/events","assignees_url":"https://api.github.com/repos/pdehaan/chronicle-1/assignees{/user}","branches_url":"https://api.github.com/repos/pdehaan/chronicle-1/branches{/branch}","tags_url":"https://api.github.com/repos/pdehaan/chronicle-1/tags","blobs_url":"https://api.github.com/repos/pdehaan/chronicle-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pdehaan/chronicle-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pdehaan/chronicle-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/pdehaan/chronicle-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pdehaan/chronicle-1/statuses/{sha}","languages_url":"https://api.github.com/repos/pdehaan/chronicle-1/languages","stargazers_url":"https://api.github.com/repos/pdehaan/chronicle-1/stargazers","contributors_url":"https://api.github.com/repos/pdehaan/chronicle-1/contributors","subscribers_url":"https://api.github.com/repos/pdehaan/chronicle-1/subscribers","subscription_url":"https://api.github.com/repos/pdehaan/chronicle-1/subscription","commits_url":"https://api.github.com/repos/pdehaan/chronicle-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/pdehaan/chronicle-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/pdehaan/chronicle-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/pdehaan/chronicle-1/issues/comments/{number}","contents_url":"https://api.github.com/repos/pdehaan/chronicle-1/contents/{+path}","compare_url":"https://api.github.com/repos/pdehaan/chronicle-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pdehaan/chronicle-1/merges","archive_url":"https://api.github.com/repos/pdehaan/chronicle-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pdehaan/chronicle-1/downloads","issues_url":"https://api.github.com/repos/pdehaan/chronicle-1/issues{/number}","pulls_url":"https://api.github.com/repos/pdehaan/chronicle-1/pulls{/number}","milestones_url":"https://api.github.com/repos/pdehaan/chronicle-1/milestones{/number}","notifications_url":"https://api.github.com/repos/pdehaan/chronicle-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pdehaan/chronicle-1/labels{/name}","releases_url":"https://api.github.com/repos/pdehaan/chronicle-1/releases{/id}","created_at":"2014-12-12T20:27:47Z","updated_at":"2014-12-05T22:47:55Z","pushed_at":"2015-02-17T22:22:30Z","git_url":"git://github.com/pdehaan/chronicle-1.git","ssh_url":"git@github.com:pdehaan/chronicle-1.git","clone_url":"https://github.com/pdehaan/chronicle-1.git","svn_url":"https://github.com/pdehaan/chronicle-1","homepage":"http://mozillachronicle.tumblr.com/","size":1249,"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":"efc5009fe79f850d7a4cb9c6cfa1b603d9a47e7d","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":27606769,"name":"chronicle","full_name":"mozilla/chronicle","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/chronicle","description":"find everything you've ever found","fork":false,"url":"https://api.github.com/repos/mozilla/chronicle","forks_url":"https://api.github.com/repos/mozilla/chronicle/forks","keys_url":"https://api.github.com/repos/mozilla/chronicle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/chronicle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/chronicle/teams","hooks_url":"https://api.github.com/repos/mozilla/chronicle/hooks","issue_events_url":"https://api.github.com/repos/mozilla/chronicle/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/chronicle/events","assignees_url":"https://api.github.com/repos/mozilla/chronicle/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/chronicle/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/chronicle/tags","blobs_url":"https://api.github.com/repos/mozilla/chronicle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/chronicle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/chronicle/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/chronicle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/chronicle/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/chronicle/languages","stargazers_url":"https://api.github.com/repos/mozilla/chronicle/stargazers","contributors_url":"https://api.github.com/repos/mozilla/chronicle/contributors","subscribers_url":"https://api.github.com/repos/mozilla/chronicle/subscribers","subscription_url":"https://api.github.com/repos/mozilla/chronicle/subscription","commits_url":"https://api.github.com/repos/mozilla/chronicle/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/chronicle/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/chronicle/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/chronicle/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/chronicle/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/chronicle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/chronicle/merges","archive_url":"https://api.github.com/repos/mozilla/chronicle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/chronicle/downloads","issues_url":"https://api.github.com/repos/mozilla/chronicle/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/chronicle/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/chronicle/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/chronicle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/chronicle/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/chronicle/releases{/id}","created_at":"2014-12-05T19:31:19Z","updated_at":"2015-02-17T22:30:02Z","pushed_at":"2015-02-17T22:30:02Z","git_url":"git://github.com/mozilla/chronicle.git","ssh_url":"git@github.com:mozilla/chronicle.git","clone_url":"https://github.com/mozilla/chronicle.git","svn_url":"https://github.com/mozilla/chronicle","homepage":"http://mozillachronicle.tumblr.com/","size":3134,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":145,"forks":4,"open_issues":145,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/chronicle/pulls/339"},"html":{"href":"https://github.com/mozilla/chronicle/pull/339"},"issue":{"href":"https://api.github.com/repos/mozilla/chronicle/issues/339"},"comments":{"href":"https://api.github.com/repos/mozilla/chronicle/issues/339/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/chronicle/pulls/339/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/chronicle/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/chronicle/pulls/339/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/chronicle/statuses/ba5c91272fa6f72d382b177f6664a48e6446cd5e"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"pdehaan","id":557895,"avatar_url":"https://avatars.githubusercontent.com/u/557895?v=3","gravatar_id":"","url":"https://api.github.com/users/pdehaan","html_url":"https://github.com/pdehaan","followers_url":"https://api.github.com/users/pdehaan/followers","following_url":"https://api.github.com/users/pdehaan/following{/other_user}","gists_url":"https://api.github.com/users/pdehaan/gists{/gist_id}","starred_url":"https://api.github.com/users/pdehaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdehaan/subscriptions","organizations_url":"https://api.github.com/users/pdehaan/orgs","repos_url":"https://api.github.com/users/pdehaan/repos","events_url":"https://api.github.com/users/pdehaan/events{/privacy}","received_events_url":"https://api.github.com/users/pdehaan/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":1,"additions":25,"deletions":183,"changed_files":2}}