{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments/34121167","id":34121167,"diff_hunk":"@@ -0,0 +1,47 @@\n+#!/usr/bin/python\n+# Makes sure bottles are fetchable after BrewTestBot modifies a formula.\n+# Only checks pushes to master on Homebrew/homebrew* remotes.\n+# To use, `ln -s $(brew --repository)/Library/Contributions/pre-push\n+# $(brew --repository)/.git/hooks`.\n+\n+import re\n+import os\n+import subprocess\n+import sys\n+\n+FORMULA_RE = re.compile(r\"^(Library/Formula/)?([A-Za-z0-9-]+)\\.rb\")\n+TESTBOT_EMAILS = [\"brew-test-bot@googlegroups.com\"]\n+\n+def git(*args):\n+    return subprocess.check_output([\"git\"] + list(args)).strip()\n+\n+def commit_author_email(commit_sha):\n+    return git(\"show\", \"-s\", \"--pretty=%ae\", commit_sha)\n+\n+def files_touched_by_commit(commit_sha):\n+    return git(\"diff-tree\", \"--name-only\", \"-r\", \"--no-commit-id\", commit_sha).split(\"\\n\")\n+\n+def commits_between(beginning, end):\n+    return git(\"rev-list\", \"{}..{}\".format(beginning, end)).split(\"\\n\")\n+\n+def push_okay(remote_name, remote_url, updates_file):\n+    if \"omebrew/homebrew\" not in remote_url:","path":"Library/Contributions/pre-push","position":28,"original_position":28,"commit_id":"94083a3422edf279858c482a1ae218629ce3a25e","original_commit_id":"94083a3422edf279858c482a1ae218629ce3a25e","user":{"login":"bfontaine","id":1334295,"avatar_url":"https://avatars.githubusercontent.com/u/1334295?v=3","gravatar_id":"","url":"https://api.github.com/users/bfontaine","html_url":"https://github.com/bfontaine","followers_url":"https://api.github.com/users/bfontaine/followers","following_url":"https://api.github.com/users/bfontaine/following{/other_user}","gists_url":"https://api.github.com/users/bfontaine/gists{/gist_id}","starred_url":"https://api.github.com/users/bfontaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfontaine/subscriptions","organizations_url":"https://api.github.com/users/bfontaine/orgs","repos_url":"https://api.github.com/users/bfontaine/repos","events_url":"https://api.github.com/users/bfontaine/events{/privacy}","received_events_url":"https://api.github.com/users/bfontaine/received_events","type":"User","site_admin":false},"body":"Is `omebrew` a typo here?","created_at":"2015-07-08T07:16:37Z","updated_at":"2015-07-08T07:16:37Z","html_url":"https://github.com/Homebrew/homebrew/pull/41478#discussion_r34121167","pull_request_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/41478","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments/34121167"},"html":{"href":"https://github.com/Homebrew/homebrew/pull/41478#discussion_r34121167"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/41478"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/41478","id":39444664,"html_url":"https://github.com/Homebrew/homebrew/pull/41478","diff_url":"https://github.com/Homebrew/homebrew/pull/41478.diff","patch_url":"https://github.com/Homebrew/homebrew/pull/41478.patch","issue_url":"https://api.github.com/repos/Homebrew/homebrew/issues/41478","number":41478,"state":"open","locked":false,"title":"Move bottle fetch from pull to a pre-push hook","user":{"login":"tdsmith","id":173889,"avatar_url":"https://avatars.githubusercontent.com/u/173889?v=3","gravatar_id":"","url":"https://api.github.com/users/tdsmith","html_url":"https://github.com/tdsmith","followers_url":"https://api.github.com/users/tdsmith/followers","following_url":"https://api.github.com/users/tdsmith/following{/other_user}","gists_url":"https://api.github.com/users/tdsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/tdsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdsmith/subscriptions","organizations_url":"https://api.github.com/users/tdsmith/orgs","repos_url":"https://api.github.com/users/tdsmith/repos","events_url":"https://api.github.com/users/tdsmith/events{/privacy}","received_events_url":"https://api.github.com/users/tdsmith/received_events","type":"User","site_admin":false},"body":"Publishing a bottle on Bintray is asynchronous. Instead of waiting a long time in `pull` before checking whether the bottle was published correctly, move the check to a pre-push hook.\n\nI have a terrible feeling you're going to ask me to rewrite this in Ruby. Call it a strawman for discussion, anyway.","created_at":"2015-07-08T06:13:50Z","updated_at":"2015-07-08T07:16:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4daff096ac0fae14f33e859e127c188bc90bd1c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/41478/commits","review_comments_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/41478/comments","review_comment_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/issues/41478/comments","statuses_url":"https://api.github.com/repos/Homebrew/homebrew/statuses/94083a3422edf279858c482a1ae218629ce3a25e","head":{"label":"tdsmith:pre-push","ref":"pre-push","sha":"94083a3422edf279858c482a1ae218629ce3a25e","user":{"login":"tdsmith","id":173889,"avatar_url":"https://avatars.githubusercontent.com/u/173889?v=3","gravatar_id":"","url":"https://api.github.com/users/tdsmith","html_url":"https://github.com/tdsmith","followers_url":"https://api.github.com/users/tdsmith/followers","following_url":"https://api.github.com/users/tdsmith/following{/other_user}","gists_url":"https://api.github.com/users/tdsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/tdsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdsmith/subscriptions","organizations_url":"https://api.github.com/users/tdsmith/orgs","repos_url":"https://api.github.com/users/tdsmith/repos","events_url":"https://api.github.com/users/tdsmith/events{/privacy}","received_events_url":"https://api.github.com/users/tdsmith/received_events","type":"User","site_admin":false},"repo":{"id":20579806,"name":"homebrew","full_name":"tdsmith/homebrew","owner":{"login":"tdsmith","id":173889,"avatar_url":"https://avatars.githubusercontent.com/u/173889?v=3","gravatar_id":"","url":"https://api.github.com/users/tdsmith","html_url":"https://github.com/tdsmith","followers_url":"https://api.github.com/users/tdsmith/followers","following_url":"https://api.github.com/users/tdsmith/following{/other_user}","gists_url":"https://api.github.com/users/tdsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/tdsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdsmith/subscriptions","organizations_url":"https://api.github.com/users/tdsmith/orgs","repos_url":"https://api.github.com/users/tdsmith/repos","events_url":"https://api.github.com/users/tdsmith/events{/privacy}","received_events_url":"https://api.github.com/users/tdsmith/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tdsmith/homebrew","description":"The missing package manager for OS X.","fork":true,"url":"https://api.github.com/repos/tdsmith/homebrew","forks_url":"https://api.github.com/repos/tdsmith/homebrew/forks","keys_url":"https://api.github.com/repos/tdsmith/homebrew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tdsmith/homebrew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tdsmith/homebrew/teams","hooks_url":"https://api.github.com/repos/tdsmith/homebrew/hooks","issue_events_url":"https://api.github.com/repos/tdsmith/homebrew/issues/events{/number}","events_url":"https://api.github.com/repos/tdsmith/homebrew/events","assignees_url":"https://api.github.com/repos/tdsmith/homebrew/assignees{/user}","branches_url":"https://api.github.com/repos/tdsmith/homebrew/branches{/branch}","tags_url":"https://api.github.com/repos/tdsmith/homebrew/tags","blobs_url":"https://api.github.com/repos/tdsmith/homebrew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tdsmith/homebrew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tdsmith/homebrew/git/refs{/sha}","trees_url":"https://api.github.com/repos/tdsmith/homebrew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tdsmith/homebrew/statuses/{sha}","languages_url":"https://api.github.com/repos/tdsmith/homebrew/languages","stargazers_url":"https://api.github.com/repos/tdsmith/homebrew/stargazers","contributors_url":"https://api.github.com/repos/tdsmith/homebrew/contributors","subscribers_url":"https://api.github.com/repos/tdsmith/homebrew/subscribers","subscription_url":"https://api.github.com/repos/tdsmith/homebrew/subscription","commits_url":"https://api.github.com/repos/tdsmith/homebrew/commits{/sha}","git_commits_url":"https://api.github.com/repos/tdsmith/homebrew/git/commits{/sha}","comments_url":"https://api.github.com/repos/tdsmith/homebrew/comments{/number}","issue_comment_url":"https://api.github.com/repos/tdsmith/homebrew/issues/comments{/number}","contents_url":"https://api.github.com/repos/tdsmith/homebrew/contents/{+path}","compare_url":"https://api.github.com/repos/tdsmith/homebrew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tdsmith/homebrew/merges","archive_url":"https://api.github.com/repos/tdsmith/homebrew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tdsmith/homebrew/downloads","issues_url":"https://api.github.com/repos/tdsmith/homebrew/issues{/number}","pulls_url":"https://api.github.com/repos/tdsmith/homebrew/pulls{/number}","milestones_url":"https://api.github.com/repos/tdsmith/homebrew/milestones{/number}","notifications_url":"https://api.github.com/repos/tdsmith/homebrew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tdsmith/homebrew/labels{/name}","releases_url":"https://api.github.com/repos/tdsmith/homebrew/releases{/id}","created_at":"2014-06-06T22:16:54Z","updated_at":"2014-06-06T22:17:18Z","pushed_at":"2015-07-08T06:09:22Z","git_url":"git://github.com/tdsmith/homebrew.git","ssh_url":"git@github.com:tdsmith/homebrew.git","clone_url":"https://github.com/tdsmith/homebrew.git","svn_url":"https://github.com/tdsmith/homebrew","homepage":"http://brew.sh","size":49815,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Homebrew:master","ref":"master","sha":"a2757f4f13cfc4f984161041466cba4cb9f2fe98","user":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"repo":{"id":206084,"name":"homebrew","full_name":"Homebrew/homebrew","owner":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Homebrew/homebrew","description":":beer: The missing package manager for OS X.","fork":false,"url":"https://api.github.com/repos/Homebrew/homebrew","forks_url":"https://api.github.com/repos/Homebrew/homebrew/forks","keys_url":"https://api.github.com/repos/Homebrew/homebrew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/homebrew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/homebrew/teams","hooks_url":"https://api.github.com/repos/Homebrew/homebrew/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/homebrew/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/homebrew/events","assignees_url":"https://api.github.com/repos/Homebrew/homebrew/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/homebrew/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/homebrew/tags","blobs_url":"https://api.github.com/repos/Homebrew/homebrew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/homebrew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/homebrew/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/homebrew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/homebrew/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/homebrew/languages","stargazers_url":"https://api.github.com/repos/Homebrew/homebrew/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/homebrew/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/homebrew/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/homebrew/subscription","commits_url":"https://api.github.com/repos/Homebrew/homebrew/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/homebrew/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/homebrew/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/homebrew/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/homebrew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/homebrew/merges","archive_url":"https://api.github.com/repos/Homebrew/homebrew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/homebrew/downloads","issues_url":"https://api.github.com/repos/Homebrew/homebrew/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/homebrew/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/homebrew/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/homebrew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/homebrew/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/homebrew/releases{/id}","created_at":"2009-05-20T19:38:37Z","updated_at":"2015-07-08T06:48:24Z","pushed_at":"2015-07-08T06:56:12Z","git_url":"git://github.com/Homebrew/homebrew.git","ssh_url":"git@github.com:Homebrew/homebrew.git","clone_url":"https://github.com/Homebrew/homebrew.git","svn_url":"https://github.com/Homebrew/homebrew","homepage":"http://brew.sh","size":1544294,"stargazers_count":23991,"watchers_count":23991,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":12039,"mirror_url":null,"open_issues_count":329,"forks":12039,"open_issues":329,"watchers":23991,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/41478"},"html":{"href":"https://github.com/Homebrew/homebrew/pull/41478"},"issue":{"href":"https://api.github.com/repos/Homebrew/homebrew/issues/41478"},"comments":{"href":"https://api.github.com/repos/Homebrew/homebrew/issues/41478/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/41478/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/41478/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/homebrew/statuses/94083a3422edf279858c482a1ae218629ce3a25e"}}}}