GitHub PullRequestReviewCommentEvent at 2014-06-12 20:25:07
Repository: broccoli-asset-rev
Actor: rickharrison
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/pulls/comments/13724207","id":13724207,"diff_hunk":"@@ -45,13 +46,20 @@ Fingerprint.prototype.getDestFilePath = function (relativePath) {\n   if (Filter.prototype.getDestFilePath.apply(this, arguments)) {\n     var tmpPath = path.join(this.inputTree.tmpDestDir, relativePath);\n     var file = fs.readFileSync(tmpPath, { encoding: 'utf8' });\n+    var hash;\n \n-    var md5 = crypto.createHash('md5');\n-    md5.update(file);\n-    var hex = md5.digest('hex');\n+    if (this.customHash) {\n+      hash = this.customHash;\n+    }\n+\n+    else {","path":"lib/fingerprint.js","position":21,"original_position":21,"commit_id":"e167a83390759aef38ba0d14a77a3ca23a2c3238","original_commit_id":"e167a83390759aef38ba0d14a77a3ca23a2c3238","user":{"login":"rickharrison","id":22048,"avatar_url":"https://avatars.githubusercontent.com/u/22048?","gravatar_id":"b9a0f8a02cb244c882cf523cafaadc7a","url":"https://api.github.com/users/rickharrison","html_url":"https://github.com/rickharrison","followers_url":"https://api.github.com/users/rickharrison/followers","following_url":"https://api.github.com/users/rickharrison/following{/other_user}","gists_url":"https://api.github.com/users/rickharrison/gists{/gist_id}","starred_url":"https://api.github.com/users/rickharrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickharrison/subscriptions","organizations_url":"https://api.github.com/users/rickharrison/orgs","repos_url":"https://api.github.com/users/rickharrison/repos","events_url":"https://api.github.com/users/rickharrison/events{/privacy}","received_events_url":"https://api.github.com/users/rickharrison/received_events","type":"User","site_admin":false},"body":"Can you make this } else { please?","created_at":"2014-06-12T20:25:07Z","updated_at":"2014-06-12T20:25:07Z","html_url":"https://github.com/rickharrison/broccoli-asset-rev/pull/3#discussion_r13724207","pull_request_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/pulls/comments/13724207"},"html":{"href":"https://github.com/rickharrison/broccoli-asset-rev/pull/3#discussion_r13724207"},"pull_request":{"href":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/pulls/3","id":17027828,"html_url":"https://github.com/rickharrison/broccoli-asset-rev/pull/3","diff_url":"https://github.com/rickharrison/broccoli-asset-rev/pull/3.diff","patch_url":"https://github.com/rickharrison/broccoli-asset-rev/pull/3.patch","issue_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/issues/3","number":3,"state":"open","title":"Option to pass a custom hash string","user":{"login":"chenn","id":638955,"avatar_url":"https://avatars.githubusercontent.com/u/638955?","gravatar_id":"6d383df9872f21a0c9f0b272722c8d98","url":"https://api.github.com/users/chenn","html_url":"https://github.com/chenn","followers_url":"https://api.github.com/users/chenn/followers","following_url":"https://api.github.com/users/chenn/following{/other_user}","gists_url":"https://api.github.com/users/chenn/gists{/gist_id}","starred_url":"https://api.github.com/users/chenn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenn/subscriptions","organizations_url":"https://api.github.com/users/chenn/orgs","repos_url":"https://api.github.com/users/chenn/repos","events_url":"https://api.github.com/users/chenn/events{/privacy}","received_events_url":"https://api.github.com/users/chenn/received_events","type":"User","site_admin":false},"body":"If you specify the `customHash` option, it will be used instead of the MD5 digest for appending to filenames. So passing “my-hash” produces `assets/vendor-my-hash.js` instead of `assets/vendor-4e4d543cde3c8a73d4723711eca0796c.js`.\r\n\r\nMy use case for this is that elsewhere in my app I have a python web server serving up the entry point (`index.html`) for an ember-cli app, and there's some other stuff in there that prevents me from using the ember-cli generated `index.html`. I need an easy way in that template to know the names of the fingerprinted files. In the past I've used git commit SHAs as fingerprints (they are helpful in debugging production deploys too) which is what I would do with a custom hash option.\r\n\r\nLet me know what you think.","created_at":"2014-06-11T22:21:57Z","updated_at":"2014-06-12T20:25:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d5d7fdc2292560ab431a8767f382a1b830a8cd9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/pulls/3/commits","review_comments_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/pulls/3/comments","review_comment_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/issues/3/comments","statuses_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/statuses/e167a83390759aef38ba0d14a77a3ca23a2c3238","head":{"label":"chenn:master","ref":"master","sha":"e167a83390759aef38ba0d14a77a3ca23a2c3238","user":{"login":"chenn","id":638955,"avatar_url":"https://avatars.githubusercontent.com/u/638955?","gravatar_id":"6d383df9872f21a0c9f0b272722c8d98","url":"https://api.github.com/users/chenn","html_url":"https://github.com/chenn","followers_url":"https://api.github.com/users/chenn/followers","following_url":"https://api.github.com/users/chenn/following{/other_user}","gists_url":"https://api.github.com/users/chenn/gists{/gist_id}","starred_url":"https://api.github.com/users/chenn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenn/subscriptions","organizations_url":"https://api.github.com/users/chenn/orgs","repos_url":"https://api.github.com/users/chenn/repos","events_url":"https://api.github.com/users/chenn/events{/privacy}","received_events_url":"https://api.github.com/users/chenn/received_events","type":"User","site_admin":false},"repo":{"id":20745938,"name":"broccoli-asset-rev","full_name":"chenn/broccoli-asset-rev","owner":{"login":"chenn","id":638955,"avatar_url":"https://avatars.githubusercontent.com/u/638955?","gravatar_id":"6d383df9872f21a0c9f0b272722c8d98","url":"https://api.github.com/users/chenn","html_url":"https://github.com/chenn","followers_url":"https://api.github.com/users/chenn/followers","following_url":"https://api.github.com/users/chenn/following{/other_user}","gists_url":"https://api.github.com/users/chenn/gists{/gist_id}","starred_url":"https://api.github.com/users/chenn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenn/subscriptions","organizations_url":"https://api.github.com/users/chenn/orgs","repos_url":"https://api.github.com/users/chenn/repos","events_url":"https://api.github.com/users/chenn/events{/privacy}","received_events_url":"https://api.github.com/users/chenn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chenn/broccoli-asset-rev","description":"Broccoli plugin to add fingerprint checksums and CDN URLs to your assets","fork":true,"url":"https://api.github.com/repos/chenn/broccoli-asset-rev","forks_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/forks","keys_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/teams","hooks_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/hooks","issue_events_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/issues/events{/number}","events_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/events","assignees_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/assignees{/user}","branches_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/branches{/branch}","tags_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/tags","blobs_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/git/refs{/sha}","trees_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/statuses/{sha}","languages_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/languages","stargazers_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/stargazers","contributors_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/contributors","subscribers_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/subscribers","subscription_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/subscription","commits_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/commits{/sha}","git_commits_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/git/commits{/sha}","comments_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/comments{/number}","issue_comment_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/issues/comments/{number}","contents_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/contents/{+path}","compare_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/merges","archive_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/downloads","issues_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/issues{/number}","pulls_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/pulls{/number}","milestones_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/milestones{/number}","notifications_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/labels{/name}","releases_url":"https://api.github.com/repos/chenn/broccoli-asset-rev/releases{/id}","created_at":"2014-06-11T22:04:41Z","updated_at":"2014-06-11T22:21:57Z","pushed_at":"2014-06-11T22:10:39Z","git_url":"git://github.com/chenn/broccoli-asset-rev.git","ssh_url":"git@github.com:chenn/broccoli-asset-rev.git","clone_url":"https://github.com/chenn/broccoli-asset-rev.git","svn_url":"https://github.com/chenn/broccoli-asset-rev","homepage":"","size":128,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rickharrison:master","ref":"master","sha":"d273bb9cc7c38521662adae9286a80d7f14f0810","user":{"login":"rickharrison","id":22048,"avatar_url":"https://avatars.githubusercontent.com/u/22048?","gravatar_id":"b9a0f8a02cb244c882cf523cafaadc7a","url":"https://api.github.com/users/rickharrison","html_url":"https://github.com/rickharrison","followers_url":"https://api.github.com/users/rickharrison/followers","following_url":"https://api.github.com/users/rickharrison/following{/other_user}","gists_url":"https://api.github.com/users/rickharrison/gists{/gist_id}","starred_url":"https://api.github.com/users/rickharrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickharrison/subscriptions","organizations_url":"https://api.github.com/users/rickharrison/orgs","repos_url":"https://api.github.com/users/rickharrison/repos","events_url":"https://api.github.com/users/rickharrison/events{/privacy}","received_events_url":"https://api.github.com/users/rickharrison/received_events","type":"User","site_admin":false},"repo":{"id":20149643,"name":"broccoli-asset-rev","full_name":"rickharrison/broccoli-asset-rev","owner":{"login":"rickharrison","id":22048,"avatar_url":"https://avatars.githubusercontent.com/u/22048?","gravatar_id":"b9a0f8a02cb244c882cf523cafaadc7a","url":"https://api.github.com/users/rickharrison","html_url":"https://github.com/rickharrison","followers_url":"https://api.github.com/users/rickharrison/followers","following_url":"https://api.github.com/users/rickharrison/following{/other_user}","gists_url":"https://api.github.com/users/rickharrison/gists{/gist_id}","starred_url":"https://api.github.com/users/rickharrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickharrison/subscriptions","organizations_url":"https://api.github.com/users/rickharrison/orgs","repos_url":"https://api.github.com/users/rickharrison/repos","events_url":"https://api.github.com/users/rickharrison/events{/privacy}","received_events_url":"https://api.github.com/users/rickharrison/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rickharrison/broccoli-asset-rev","description":"Broccoli plugin to add fingerprint checksums and CDN URLs to your assets","fork":false,"url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev","forks_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/forks","keys_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/teams","hooks_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/hooks","issue_events_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/issues/events{/number}","events_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/events","assignees_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/assignees{/user}","branches_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/branches{/branch}","tags_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/tags","blobs_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/git/refs{/sha}","trees_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/statuses/{sha}","languages_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/languages","stargazers_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/stargazers","contributors_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/contributors","subscribers_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/subscribers","subscription_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/subscription","commits_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/commits{/sha}","git_commits_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/git/commits{/sha}","comments_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/comments{/number}","issue_comment_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/issues/comments/{number}","contents_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/contents/{+path}","compare_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/merges","archive_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/downloads","issues_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/issues{/number}","pulls_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/pulls{/number}","milestones_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/milestones{/number}","notifications_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/labels{/name}","releases_url":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/releases{/id}","created_at":"2014-05-25T08:04:46Z","updated_at":"2014-06-09T02:40:17Z","pushed_at":"2014-05-30T02:35:45Z","git_url":"git://github.com/rickharrison/broccoli-asset-rev.git","ssh_url":"git@github.com:rickharrison/broccoli-asset-rev.git","clone_url":"https://github.com/rickharrison/broccoli-asset-rev.git","svn_url":"https://github.com/rickharrison/broccoli-asset-rev","homepage":"","size":226,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/pulls/3"},"html":{"href":"https://github.com/rickharrison/broccoli-asset-rev/pull/3"},"issue":{"href":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/issues/3"},"comments":{"href":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/rickharrison/broccoli-asset-rev/statuses/e167a83390759aef38ba0d14a77a3ca23a2c3238"}}}}