{"action":"created","comment":{"url":"https://api.github.com/repos/joyent/manta-manatee/pulls/comments/49406362","id":49406362,"diff_hunk":"@@ -15,21 +15,6 @@ export HOME=/root\n export PATH=$PATH:/opt/local/bin\n source /root/.bashrc\n \n-shard=$(cat /opt/smartdc/manatee/etc/sitter.json | json shardPath | cut -d '/' -f3)\n-topology=$(manatee-stat| json -D / $shard)\n-primary=\n-sync=\n-\n-if [[ -z $topology ]]; then\n-    echo fail && exit;\n-fi\n-\n-primary=$(echo $topology | json primary.repl.sync_state)\n-sync=$(echo $topology | json sync.repl.sync_state)\n-\n-if [[ $primary != 'sync' ]]; then\n-    echo fail && exit;\n-fi\n-if [[ $sync != 'async' ]]; then\n-    echo fail;\n+if ! manatee-adm verify; then\n+    echo fail && exit 1;","path":"bin/manatee-stat-alarm.sh","position":22,"original_position":22,"commit_id":"8a763e206cf4a60592661c259f276dd13f2e1304","original_commit_id":"8a763e206cf4a60592661c259f276dd13f2e1304","user":{"login":"jclulow","id":304070,"avatar_url":"https://avatars.githubusercontent.com/u/304070?v=3","gravatar_id":"","url":"https://api.github.com/users/jclulow","html_url":"https://github.com/jclulow","followers_url":"https://api.github.com/users/jclulow/followers","following_url":"https://api.github.com/users/jclulow/following{/other_user}","gists_url":"https://api.github.com/users/jclulow/gists{/gist_id}","starred_url":"https://api.github.com/users/jclulow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jclulow/subscriptions","organizations_url":"https://api.github.com/users/jclulow/orgs","repos_url":"https://api.github.com/users/jclulow/repos","events_url":"https://api.github.com/users/jclulow/events{/privacy}","received_events_url":"https://api.github.com/users/jclulow/received_events","type":"User","site_admin":false},"body":"Can you remove this superfluous semicolon, and split on the `&&` to just be two lines in the `then` block?  e.g.\r\n\r\n```bash\r\nif ! manatee-adm verify; then\r\n    echo fail\r\n    exit 1\r\nfi\r\n```","created_at":"2016-01-12T01:42:58Z","updated_at":"2016-01-12T01:42:58Z","html_url":"https://github.com/joyent/manta-manatee/pull/1#discussion_r49406362","pull_request_url":"https://api.github.com/repos/joyent/manta-manatee/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/joyent/manta-manatee/pulls/comments/49406362"},"html":{"href":"https://github.com/joyent/manta-manatee/pull/1#discussion_r49406362"},"pull_request":{"href":"https://api.github.com/repos/joyent/manta-manatee/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/joyent/manta-manatee/pulls/1","id":55695471,"html_url":"https://github.com/joyent/manta-manatee/pull/1","diff_url":"https://github.com/joyent/manta-manatee/pull/1.diff","patch_url":"https://github.com/joyent/manta-manatee/pull/1.patch","issue_url":"https://api.github.com/repos/joyent/manta-manatee/issues/1","number":1,"state":"open","locked":false,"title":"Manatee 298 - Use `manatee-adm verify` for manatee-stat-alarm.sh.","user":{"login":"bahamat","id":1612974,"avatar_url":"https://avatars.githubusercontent.com/u/1612974?v=3","gravatar_id":"","url":"https://api.github.com/users/bahamat","html_url":"https://github.com/bahamat","followers_url":"https://api.github.com/users/bahamat/followers","following_url":"https://api.github.com/users/bahamat/following{/other_user}","gists_url":"https://api.github.com/users/bahamat/gists{/gist_id}","starred_url":"https://api.github.com/users/bahamat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bahamat/subscriptions","organizations_url":"https://api.github.com/users/bahamat/orgs","repos_url":"https://api.github.com/users/bahamat/repos","events_url":"https://api.github.com/users/bahamat/events{/privacy}","received_events_url":"https://api.github.com/users/bahamat/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-11T23:45:04Z","updated_at":"2016-01-12T01:42:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cdbea65f3ecc400e41829d97b7615e57ec4b61b9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/joyent/manta-manatee/pulls/1/commits","review_comments_url":"https://api.github.com/repos/joyent/manta-manatee/pulls/1/comments","review_comment_url":"https://api.github.com/repos/joyent/manta-manatee/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joyent/manta-manatee/issues/1/comments","statuses_url":"https://api.github.com/repos/joyent/manta-manatee/statuses/8a763e206cf4a60592661c259f276dd13f2e1304","head":{"label":"bahamat:MANATEE-298","ref":"MANATEE-298","sha":"8a763e206cf4a60592661c259f276dd13f2e1304","user":{"login":"bahamat","id":1612974,"avatar_url":"https://avatars.githubusercontent.com/u/1612974?v=3","gravatar_id":"","url":"https://api.github.com/users/bahamat","html_url":"https://github.com/bahamat","followers_url":"https://api.github.com/users/bahamat/followers","following_url":"https://api.github.com/users/bahamat/following{/other_user}","gists_url":"https://api.github.com/users/bahamat/gists{/gist_id}","starred_url":"https://api.github.com/users/bahamat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bahamat/subscriptions","organizations_url":"https://api.github.com/users/bahamat/orgs","repos_url":"https://api.github.com/users/bahamat/repos","events_url":"https://api.github.com/users/bahamat/events{/privacy}","received_events_url":"https://api.github.com/users/bahamat/received_events","type":"User","site_admin":false},"repo":{"id":49461181,"name":"manta-manatee","full_name":"bahamat/manta-manatee","owner":{"login":"bahamat","id":1612974,"avatar_url":"https://avatars.githubusercontent.com/u/1612974?v=3","gravatar_id":"","url":"https://api.github.com/users/bahamat","html_url":"https://github.com/bahamat","followers_url":"https://api.github.com/users/bahamat/followers","following_url":"https://api.github.com/users/bahamat/following{/other_user}","gists_url":"https://api.github.com/users/bahamat/gists{/gist_id}","starred_url":"https://api.github.com/users/bahamat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bahamat/subscriptions","organizations_url":"https://api.github.com/users/bahamat/orgs","repos_url":"https://api.github.com/users/bahamat/repos","events_url":"https://api.github.com/users/bahamat/events{/privacy}","received_events_url":"https://api.github.com/users/bahamat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bahamat/manta-manatee","description":"Manta HA Postgres","fork":true,"url":"https://api.github.com/repos/bahamat/manta-manatee","forks_url":"https://api.github.com/repos/bahamat/manta-manatee/forks","keys_url":"https://api.github.com/repos/bahamat/manta-manatee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bahamat/manta-manatee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bahamat/manta-manatee/teams","hooks_url":"https://api.github.com/repos/bahamat/manta-manatee/hooks","issue_events_url":"https://api.github.com/repos/bahamat/manta-manatee/issues/events{/number}","events_url":"https://api.github.com/repos/bahamat/manta-manatee/events","assignees_url":"https://api.github.com/repos/bahamat/manta-manatee/assignees{/user}","branches_url":"https://api.github.com/repos/bahamat/manta-manatee/branches{/branch}","tags_url":"https://api.github.com/repos/bahamat/manta-manatee/tags","blobs_url":"https://api.github.com/repos/bahamat/manta-manatee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bahamat/manta-manatee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bahamat/manta-manatee/git/refs{/sha}","trees_url":"https://api.github.com/repos/bahamat/manta-manatee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bahamat/manta-manatee/statuses/{sha}","languages_url":"https://api.github.com/repos/bahamat/manta-manatee/languages","stargazers_url":"https://api.github.com/repos/bahamat/manta-manatee/stargazers","contributors_url":"https://api.github.com/repos/bahamat/manta-manatee/contributors","subscribers_url":"https://api.github.com/repos/bahamat/manta-manatee/subscribers","subscription_url":"https://api.github.com/repos/bahamat/manta-manatee/subscription","commits_url":"https://api.github.com/repos/bahamat/manta-manatee/commits{/sha}","git_commits_url":"https://api.github.com/repos/bahamat/manta-manatee/git/commits{/sha}","comments_url":"https://api.github.com/repos/bahamat/manta-manatee/comments{/number}","issue_comment_url":"https://api.github.com/repos/bahamat/manta-manatee/issues/comments{/number}","contents_url":"https://api.github.com/repos/bahamat/manta-manatee/contents/{+path}","compare_url":"https://api.github.com/repos/bahamat/manta-manatee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bahamat/manta-manatee/merges","archive_url":"https://api.github.com/repos/bahamat/manta-manatee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bahamat/manta-manatee/downloads","issues_url":"https://api.github.com/repos/bahamat/manta-manatee/issues{/number}","pulls_url":"https://api.github.com/repos/bahamat/manta-manatee/pulls{/number}","milestones_url":"https://api.github.com/repos/bahamat/manta-manatee/milestones{/number}","notifications_url":"https://api.github.com/repos/bahamat/manta-manatee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bahamat/manta-manatee/labels{/name}","releases_url":"https://api.github.com/repos/bahamat/manta-manatee/releases{/id}","created_at":"2016-01-11T23:27:40Z","updated_at":"2016-01-11T23:27:40Z","pushed_at":"2016-01-11T23:32:18Z","git_url":"git://github.com/bahamat/manta-manatee.git","ssh_url":"git@github.com:bahamat/manta-manatee.git","clone_url":"https://github.com/bahamat/manta-manatee.git","svn_url":"https://github.com/bahamat/manta-manatee","homepage":null,"size":112,"stargazers_count":0,"watchers_count":0,"language":"Shell","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":"joyent:master","ref":"master","sha":"1343a7b258f01860c75c704dfe0ceff4b2f37998","user":{"login":"joyent","id":10161,"avatar_url":"https://avatars.githubusercontent.com/u/10161?v=3","gravatar_id":"","url":"https://api.github.com/users/joyent","html_url":"https://github.com/joyent","followers_url":"https://api.github.com/users/joyent/followers","following_url":"https://api.github.com/users/joyent/following{/other_user}","gists_url":"https://api.github.com/users/joyent/gists{/gist_id}","starred_url":"https://api.github.com/users/joyent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joyent/subscriptions","organizations_url":"https://api.github.com/users/joyent/orgs","repos_url":"https://api.github.com/users/joyent/repos","events_url":"https://api.github.com/users/joyent/events{/privacy}","received_events_url":"https://api.github.com/users/joyent/received_events","type":"Organization","site_admin":false},"repo":{"id":23409334,"name":"manta-manatee","full_name":"joyent/manta-manatee","owner":{"login":"joyent","id":10161,"avatar_url":"https://avatars.githubusercontent.com/u/10161?v=3","gravatar_id":"","url":"https://api.github.com/users/joyent","html_url":"https://github.com/joyent","followers_url":"https://api.github.com/users/joyent/followers","following_url":"https://api.github.com/users/joyent/following{/other_user}","gists_url":"https://api.github.com/users/joyent/gists{/gist_id}","starred_url":"https://api.github.com/users/joyent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joyent/subscriptions","organizations_url":"https://api.github.com/users/joyent/orgs","repos_url":"https://api.github.com/users/joyent/repos","events_url":"https://api.github.com/users/joyent/events{/privacy}","received_events_url":"https://api.github.com/users/joyent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/joyent/manta-manatee","description":"Manta HA Postgres","fork":false,"url":"https://api.github.com/repos/joyent/manta-manatee","forks_url":"https://api.github.com/repos/joyent/manta-manatee/forks","keys_url":"https://api.github.com/repos/joyent/manta-manatee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joyent/manta-manatee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joyent/manta-manatee/teams","hooks_url":"https://api.github.com/repos/joyent/manta-manatee/hooks","issue_events_url":"https://api.github.com/repos/joyent/manta-manatee/issues/events{/number}","events_url":"https://api.github.com/repos/joyent/manta-manatee/events","assignees_url":"https://api.github.com/repos/joyent/manta-manatee/assignees{/user}","branches_url":"https://api.github.com/repos/joyent/manta-manatee/branches{/branch}","tags_url":"https://api.github.com/repos/joyent/manta-manatee/tags","blobs_url":"https://api.github.com/repos/joyent/manta-manatee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joyent/manta-manatee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joyent/manta-manatee/git/refs{/sha}","trees_url":"https://api.github.com/repos/joyent/manta-manatee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joyent/manta-manatee/statuses/{sha}","languages_url":"https://api.github.com/repos/joyent/manta-manatee/languages","stargazers_url":"https://api.github.com/repos/joyent/manta-manatee/stargazers","contributors_url":"https://api.github.com/repos/joyent/manta-manatee/contributors","subscribers_url":"https://api.github.com/repos/joyent/manta-manatee/subscribers","subscription_url":"https://api.github.com/repos/joyent/manta-manatee/subscription","commits_url":"https://api.github.com/repos/joyent/manta-manatee/commits{/sha}","git_commits_url":"https://api.github.com/repos/joyent/manta-manatee/git/commits{/sha}","comments_url":"https://api.github.com/repos/joyent/manta-manatee/comments{/number}","issue_comment_url":"https://api.github.com/repos/joyent/manta-manatee/issues/comments{/number}","contents_url":"https://api.github.com/repos/joyent/manta-manatee/contents/{+path}","compare_url":"https://api.github.com/repos/joyent/manta-manatee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joyent/manta-manatee/merges","archive_url":"https://api.github.com/repos/joyent/manta-manatee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joyent/manta-manatee/downloads","issues_url":"https://api.github.com/repos/joyent/manta-manatee/issues{/number}","pulls_url":"https://api.github.com/repos/joyent/manta-manatee/pulls{/number}","milestones_url":"https://api.github.com/repos/joyent/manta-manatee/milestones{/number}","notifications_url":"https://api.github.com/repos/joyent/manta-manatee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joyent/manta-manatee/labels{/name}","releases_url":"https://api.github.com/repos/joyent/manta-manatee/releases{/id}","created_at":"2014-08-27T23:53:17Z","updated_at":"2015-04-17T17:02:56Z","pushed_at":"2016-01-11T23:45:04Z","git_url":"git://github.com/joyent/manta-manatee.git","ssh_url":"git@github.com:joyent/manta-manatee.git","clone_url":"https://github.com/joyent/manta-manatee.git","svn_url":"https://github.com/joyent/manta-manatee","homepage":null,"size":112,"stargazers_count":1,"watchers_count":1,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/joyent/manta-manatee/pulls/1"},"html":{"href":"https://github.com/joyent/manta-manatee/pull/1"},"issue":{"href":"https://api.github.com/repos/joyent/manta-manatee/issues/1"},"comments":{"href":"https://api.github.com/repos/joyent/manta-manatee/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/joyent/manta-manatee/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/joyent/manta-manatee/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joyent/manta-manatee/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/joyent/manta-manatee/statuses/8a763e206cf4a60592661c259f276dd13f2e1304"}}}}