{"action":"created","comment":{"url":"https://api.github.com/repos/zendesk/samson/pulls/comments/68278548","id":68278548,"diff_hunk":"@@ -336,6 +336,9 @@\n     t.integer  \"stage_id\",    limit: 4,     null: false\n     t.datetime \"created_at\"\n     t.datetime \"updated_at\"\n+    t.boolean  \"before_deploy\",               default: false, null: false","path":"db/schema.rb","position":4,"original_position":4,"commit_id":"e00fc0e486b2a6497d337bfc9732898df1d348f0","original_commit_id":"e00fc0e486b2a6497d337bfc9732898df1d348f0","user":{"login":"zehua","id":314392,"avatar_url":"https://avatars.githubusercontent.com/u/314392?v=3","gravatar_id":"","url":"https://api.github.com/users/zehua","html_url":"https://github.com/zehua","followers_url":"https://api.github.com/users/zehua/followers","following_url":"https://api.github.com/users/zehua/following{/other_user}","gists_url":"https://api.github.com/users/zehua/gists{/gist_id}","starred_url":"https://api.github.com/users/zehua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zehua/subscriptions","organizations_url":"https://api.github.com/users/zehua/orgs","repos_url":"https://api.github.com/users/zehua/repos","events_url":"https://api.github.com/users/zehua/events{/privacy}","received_events_url":"https://api.github.com/users/zehua/received_events","type":"User","site_admin":false},"body":"Because the migration file was generated two weeks ago, the schema version (aka the timestamp) is now not the latest, due to other PRs merged. If we haven't deployed to production, since two weeks ago, it's probably fine. Otherwise, I could re-generate the migrations file to give it a newer timestamp.","created_at":"2016-06-23T17:31:41Z","updated_at":"2016-06-23T17:31:41Z","html_url":"https://github.com/zendesk/samson/pull/1058#discussion_r68278548","pull_request_url":"https://api.github.com/repos/zendesk/samson/pulls/1058","_links":{"self":{"href":"https://api.github.com/repos/zendesk/samson/pulls/comments/68278548"},"html":{"href":"https://github.com/zendesk/samson/pull/1058#discussion_r68278548"},"pull_request":{"href":"https://api.github.com/repos/zendesk/samson/pulls/1058"}}},"pull_request":{"url":"https://api.github.com/repos/zendesk/samson/pulls/1058","id":73344624,"html_url":"https://github.com/zendesk/samson/pull/1058","diff_url":"https://github.com/zendesk/samson/pull/1058.diff","patch_url":"https://github.com/zendesk/samson/pull/1058.patch","issue_url":"https://api.github.com/repos/zendesk/samson/issues/1058","number":1058,"state":"open","locked":false,"title":"Updated Slack Webhooks plugin to support more customization and buddy approval request","user":{"login":"zehua","id":314392,"avatar_url":"https://avatars.githubusercontent.com/u/314392?v=3","gravatar_id":"","url":"https://api.github.com/users/zehua","html_url":"https://github.com/zehua","followers_url":"https://api.github.com/users/zehua/followers","following_url":"https://api.github.com/users/zehua/following{/other_user}","gists_url":"https://api.github.com/users/zehua/gists{/gist_id}","starred_url":"https://api.github.com/users/zehua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zehua/subscriptions","organizations_url":"https://api.github.com/users/zehua/orgs","repos_url":"https://api.github.com/users/zehua/repos","events_url":"https://api.github.com/users/zehua/events{/privacy}","received_events_url":"https://api.github.com/users/zehua/received_events","type":"User","site_admin":false},"body":"There are still a bunch of TODOs. But I am sending this for early review of the UI and design before I dive too deep.\r\n\r\n- updated the Slack webhook configuration in stage config UI to support configuration of whether to send notification pre and / or post deployment. And also to indicate whether the hook is to be used for buddy approval request\r\n![image](https://cloud.githubusercontent.com/assets/314392/15959918/b81107f2-2f2f-11e6-930c-fae2bdda81ea.png)\r\n\r\n- added buddy approval request related UI, similar to that of flowdock\r\n![screen shot 2016-06-10 at 5 15 49 pm](https://cloud.githubusercontent.com/assets/314392/15959963/0554709e-2f30-11e6-9945-e042265acddd.png)\r\n\r\n- buddy approval request on Slack looks like this:\r\n![screen shot 2016-06-10 at 5 15 29 pm](https://cloud.githubusercontent.com/assets/314392/15959985/1fb15218-2f30-11e6-9de0-555338b92bed.png)\r\n\r\n- added a new ENV var SLACK_API_TOKEN for fetching Slack users for @ mentions in buddy approval\r\n\r\n- There are quite some amount of duplication of codes. I am not sure what the best way is to share codes between two plugins.\r\n\r\n/cc @zendesk/samson @zendesk/vulcan \r\n\r\n### Tasks\r\n - [ ] :+1: from team\r\n - [x] improve the deploy notification message to include PR info\r\n - [x] add / update tests\r\n - [x] should I check in changes to `db/schema.rb`?\r\n - [x] replace slack-ruby-client with raw Faraday calls\r\n - [ ] refactor shared template\r\n\r\n### References\r\n - Jira link: https://zendesk.atlassian.net/browse/SAMSON-249\r\n\r\n### Risks\r\n- Level: Med. \r\n- Should affect only the Slack plugin.\r\n\r\n\r\n","created_at":"2016-06-10T09:27:08Z","updated_at":"2016-06-23T17:31:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"817c7d73f8d10e9bbcfd6ef0da3bcc18404cb712","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zendesk/samson/pulls/1058/commits","review_comments_url":"https://api.github.com/repos/zendesk/samson/pulls/1058/comments","review_comment_url":"https://api.github.com/repos/zendesk/samson/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendesk/samson/issues/1058/comments","statuses_url":"https://api.github.com/repos/zendesk/samson/statuses/e00fc0e486b2a6497d337bfc9732898df1d348f0","head":{"label":"zendesk:zehua/SAMSON-249-more-slack-support","ref":"zehua/SAMSON-249-more-slack-support","sha":"e00fc0e486b2a6497d337bfc9732898df1d348f0","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":20208662,"name":"samson","full_name":"zendesk/samson","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/samson","description":"Web interface for deployments","fork":false,"url":"https://api.github.com/repos/zendesk/samson","forks_url":"https://api.github.com/repos/zendesk/samson/forks","keys_url":"https://api.github.com/repos/zendesk/samson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/samson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/samson/teams","hooks_url":"https://api.github.com/repos/zendesk/samson/hooks","issue_events_url":"https://api.github.com/repos/zendesk/samson/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/samson/events","assignees_url":"https://api.github.com/repos/zendesk/samson/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/samson/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/samson/tags","blobs_url":"https://api.github.com/repos/zendesk/samson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/samson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/samson/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/samson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/samson/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/samson/languages","stargazers_url":"https://api.github.com/repos/zendesk/samson/stargazers","contributors_url":"https://api.github.com/repos/zendesk/samson/contributors","subscribers_url":"https://api.github.com/repos/zendesk/samson/subscribers","subscription_url":"https://api.github.com/repos/zendesk/samson/subscription","commits_url":"https://api.github.com/repos/zendesk/samson/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/samson/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/samson/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/samson/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/samson/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/samson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/samson/merges","archive_url":"https://api.github.com/repos/zendesk/samson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/samson/downloads","issues_url":"https://api.github.com/repos/zendesk/samson/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/samson/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/samson/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/samson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/samson/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/samson/releases{/id}","deployments_url":"https://api.github.com/repos/zendesk/samson/deployments","created_at":"2014-05-27T05:55:57Z","updated_at":"2016-06-23T07:08:52Z","pushed_at":"2016-06-23T17:22:53Z","git_url":"git://github.com/zendesk/samson.git","ssh_url":"git@github.com:zendesk/samson.git","clone_url":"https://github.com/zendesk/samson.git","svn_url":"https://github.com/zendesk/samson","homepage":null,"size":195579,"stargazers_count":688,"watchers_count":688,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":119,"mirror_url":null,"open_issues_count":56,"forks":119,"open_issues":56,"watchers":688,"default_branch":"master"}},"base":{"label":"zendesk:master","ref":"master","sha":"37bb69537f139a8e4b3c9e6a799d45e3831fc561","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":20208662,"name":"samson","full_name":"zendesk/samson","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/samson","description":"Web interface for deployments","fork":false,"url":"https://api.github.com/repos/zendesk/samson","forks_url":"https://api.github.com/repos/zendesk/samson/forks","keys_url":"https://api.github.com/repos/zendesk/samson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/samson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/samson/teams","hooks_url":"https://api.github.com/repos/zendesk/samson/hooks","issue_events_url":"https://api.github.com/repos/zendesk/samson/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/samson/events","assignees_url":"https://api.github.com/repos/zendesk/samson/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/samson/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/samson/tags","blobs_url":"https://api.github.com/repos/zendesk/samson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/samson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/samson/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/samson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/samson/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/samson/languages","stargazers_url":"https://api.github.com/repos/zendesk/samson/stargazers","contributors_url":"https://api.github.com/repos/zendesk/samson/contributors","subscribers_url":"https://api.github.com/repos/zendesk/samson/subscribers","subscription_url":"https://api.github.com/repos/zendesk/samson/subscription","commits_url":"https://api.github.com/repos/zendesk/samson/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/samson/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/samson/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/samson/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/samson/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/samson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/samson/merges","archive_url":"https://api.github.com/repos/zendesk/samson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/samson/downloads","issues_url":"https://api.github.com/repos/zendesk/samson/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/samson/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/samson/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/samson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/samson/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/samson/releases{/id}","deployments_url":"https://api.github.com/repos/zendesk/samson/deployments","created_at":"2014-05-27T05:55:57Z","updated_at":"2016-06-23T07:08:52Z","pushed_at":"2016-06-23T17:22:53Z","git_url":"git://github.com/zendesk/samson.git","ssh_url":"git@github.com:zendesk/samson.git","clone_url":"https://github.com/zendesk/samson.git","svn_url":"https://github.com/zendesk/samson","homepage":null,"size":195579,"stargazers_count":688,"watchers_count":688,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":119,"mirror_url":null,"open_issues_count":56,"forks":119,"open_issues":56,"watchers":688,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendesk/samson/pulls/1058"},"html":{"href":"https://github.com/zendesk/samson/pull/1058"},"issue":{"href":"https://api.github.com/repos/zendesk/samson/issues/1058"},"comments":{"href":"https://api.github.com/repos/zendesk/samson/issues/1058/comments"},"review_comments":{"href":"https://api.github.com/repos/zendesk/samson/pulls/1058/comments"},"review_comment":{"href":"https://api.github.com/repos/zendesk/samson/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendesk/samson/pulls/1058/commits"},"statuses":{"href":"https://api.github.com/repos/zendesk/samson/statuses/e00fc0e486b2a6497d337bfc9732898df1d348f0"}}}}
{"actor":{"display_login":"zehua"}}