{"action":"created","comment":{"url":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls/comments/67014813","id":67014813,"diff_hunk":"@@ -38,3 +38,24 @@ func serveUserEmails(w http.ResponseWriter, r *http.Request) error {\n \t}\n \treturn writeJSON(w, emails)\n }\n+\n+func serveEmailSubscription(w http.ResponseWriter, r *http.Request) error {\n+\tnewBody, newErr := ioutil.ReadAll(r.Body)\n+\tif newErr != nil {\n+\t\treturn newErr\n+\t}\n+\n+\tclient := &http.Client{}\n+\treq, err := http.NewRequest(\"POST\", \"https://us8.api.mailchimp.com/3.0/lists/dd6c4706a1/members\", bytes.NewReader(newBody))\n+\treq.Header.Set(\"Content-Type\", \"application/json\")\n+\treq.SetBasicAuth(\"user\", \"132948e46a1e7ce8bad6fe375567383e-us8\")\n+\tresp, err := client.Do(req)\n+\tdefer resp.Body.Close()\n+\tbody, err := ioutil.ReadAll(resp.Body)\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\n+\treturn writeJSON(w, string(body))","path":"services/httpapi/user.go","position":36,"original_position":36,"commit_id":"ece09cf9f85dbfad46c876337eeffd6d58e1ef17","original_commit_id":"ece09cf9f85dbfad46c876337eeffd6d58e1ef17","user":{"login":"KattMingMing","id":4897310,"avatar_url":"https://avatars.githubusercontent.com/u/4897310?v=3","gravatar_id":"","url":"https://api.github.com/users/KattMingMing","html_url":"https://github.com/KattMingMing","followers_url":"https://api.github.com/users/KattMingMing/followers","following_url":"https://api.github.com/users/KattMingMing/following{/other_user}","gists_url":"https://api.github.com/users/KattMingMing/gists{/gist_id}","starred_url":"https://api.github.com/users/KattMingMing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KattMingMing/subscriptions","organizations_url":"https://api.github.com/users/KattMingMing/orgs","repos_url":"https://api.github.com/users/KattMingMing/repos","events_url":"https://api.github.com/users/KattMingMing/events{/privacy}","received_events_url":"https://api.github.com/users/KattMingMing/received_events","type":"User","site_admin":false},"body":"I tested this and it worked, I checked the response tab and the JSON was getting back correctly and there weren't any errors, but maybe I missed something?","created_at":"2016-06-14T17:17:25Z","updated_at":"2016-06-14T17:17:25Z","html_url":"https://github.com/sourcegraph/sourcegraph/pull/86#discussion_r67014813","pull_request_url":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls/86","_links":{"self":{"href":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls/comments/67014813"},"html":{"href":"https://github.com/sourcegraph/sourcegraph/pull/86#discussion_r67014813"},"pull_request":{"href":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls/86"}}},"pull_request":{"url":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls/86","id":73525654,"html_url":"https://github.com/sourcegraph/sourcegraph/pull/86","diff_url":"https://github.com/sourcegraph/sourcegraph/pull/86.diff","patch_url":"https://github.com/sourcegraph/sourcegraph/pull/86.patch","issue_url":"https://api.github.com/repos/sourcegraph/sourcegraph/issues/86","number":86,"state":"open","locked":false,"title":"SFYE release","user":{"login":"uforic","id":253496,"avatar_url":"https://avatars.githubusercontent.com/u/253496?v=3","gravatar_id":"","url":"https://api.github.com/users/uforic","html_url":"https://github.com/uforic","followers_url":"https://api.github.com/users/uforic/followers","following_url":"https://api.github.com/users/uforic/following{/other_user}","gists_url":"https://api.github.com/users/uforic/gists{/gist_id}","starred_url":"https://api.github.com/users/uforic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uforic/subscriptions","organizations_url":"https://api.github.com/users/uforic/orgs","repos_url":"https://api.github.com/users/uforic/repos","events_url":"https://api.github.com/users/uforic/events{/privacy}","received_events_url":"https://api.github.com/users/uforic/received_events","type":"User","site_admin":false},"body":"Set of changes intended for SFYE release. Includes:\r\n- Link on homepage for SFYE\r\n- Improved /tools page copy\r\n- Different tools url scheme (/tools/editor, not /tools?type=editor\r\n- Form to gather interest from people about future languages and editors\r\n- MailChimp integration code to collect interest\r\n\r\n##### Reviewer tasks\r\n\r\n- [ ] HACKS: There are major Javascript hacks to get the location to set. I'd love to know the better way to do some of these, or be pointed to some of thelper functions! (i.e. to strip \"editor\" off the end of \"/tools/editor\"\r\n- [ ] SECURITY: New endpoint introduced, pass through to mail chimp. Want to make sure it all looks good\r\n- [ ] METRICS: reviewer verified correct usage metric tracking was added\r\n- [ ] UNIT-TEST: reviewer approves the unit tests (or the justified omission thereof)\r\n- [ ] E2E-TEST: reviewer approves end-to-end tests (or the justified omission thereof)\r\n- [ ] COPY: How is the copy lookking\r\n\r\n##### Test plan\r\n\r\nHave been testing on staging2. Sample forms submitted. \r\n\r\n** Note ** to be able to submit a form after you've submitted it once, open a new incognito browser, or type: window.localStorage[\"email_subscription_submitted\"] = false \r\n\r\n##### Known issues\r\n- [x] Install buttons on action screen look bad, battling with CSS and want to ask for some ideas on this","created_at":"2016-06-13T05:59:38Z","updated_at":"2016-06-14T17:17:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08a3355f155d05a13a644005488efb2f323fa7fa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls/86/commits","review_comments_url":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls/86/comments","review_comment_url":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sourcegraph/sourcegraph/issues/86/comments","statuses_url":"https://api.github.com/repos/sourcegraph/sourcegraph/statuses/ece09cf9f85dbfad46c876337eeffd6d58e1ef17","head":{"label":"sourcegraph:feature/email_engagement","ref":"feature/email_engagement","sha":"ece09cf9f85dbfad46c876337eeffd6d58e1ef17","user":{"login":"sourcegraph","id":3979584,"avatar_url":"https://avatars.githubusercontent.com/u/3979584?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcegraph","html_url":"https://github.com/sourcegraph","followers_url":"https://api.github.com/users/sourcegraph/followers","following_url":"https://api.github.com/users/sourcegraph/following{/other_user}","gists_url":"https://api.github.com/users/sourcegraph/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcegraph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcegraph/subscriptions","organizations_url":"https://api.github.com/users/sourcegraph/orgs","repos_url":"https://api.github.com/users/sourcegraph/repos","events_url":"https://api.github.com/users/sourcegraph/events{/privacy}","received_events_url":"https://api.github.com/users/sourcegraph/received_events","type":"Organization","site_admin":false},"repo":{"id":60245511,"name":"sourcegraph","full_name":"sourcegraph/sourcegraph","owner":{"login":"sourcegraph","id":3979584,"avatar_url":"https://avatars.githubusercontent.com/u/3979584?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcegraph","html_url":"https://github.com/sourcegraph","followers_url":"https://api.github.com/users/sourcegraph/followers","following_url":"https://api.github.com/users/sourcegraph/following{/other_user}","gists_url":"https://api.github.com/users/sourcegraph/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcegraph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcegraph/subscriptions","organizations_url":"https://api.github.com/users/sourcegraph/orgs","repos_url":"https://api.github.com/users/sourcegraph/repos","events_url":"https://api.github.com/users/sourcegraph/events{/privacy}","received_events_url":"https://api.github.com/users/sourcegraph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sourcegraph/sourcegraph","description":"Fast, global, semantic code search & cross-reference engine for developers.","fork":false,"url":"https://api.github.com/repos/sourcegraph/sourcegraph","forks_url":"https://api.github.com/repos/sourcegraph/sourcegraph/forks","keys_url":"https://api.github.com/repos/sourcegraph/sourcegraph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sourcegraph/sourcegraph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sourcegraph/sourcegraph/teams","hooks_url":"https://api.github.com/repos/sourcegraph/sourcegraph/hooks","issue_events_url":"https://api.github.com/repos/sourcegraph/sourcegraph/issues/events{/number}","events_url":"https://api.github.com/repos/sourcegraph/sourcegraph/events","assignees_url":"https://api.github.com/repos/sourcegraph/sourcegraph/assignees{/user}","branches_url":"https://api.github.com/repos/sourcegraph/sourcegraph/branches{/branch}","tags_url":"https://api.github.com/repos/sourcegraph/sourcegraph/tags","blobs_url":"https://api.github.com/repos/sourcegraph/sourcegraph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sourcegraph/sourcegraph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sourcegraph/sourcegraph/git/refs{/sha}","trees_url":"https://api.github.com/repos/sourcegraph/sourcegraph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sourcegraph/sourcegraph/statuses/{sha}","languages_url":"https://api.github.com/repos/sourcegraph/sourcegraph/languages","stargazers_url":"https://api.github.com/repos/sourcegraph/sourcegraph/stargazers","contributors_url":"https://api.github.com/repos/sourcegraph/sourcegraph/contributors","subscribers_url":"https://api.github.com/repos/sourcegraph/sourcegraph/subscribers","subscription_url":"https://api.github.com/repos/sourcegraph/sourcegraph/subscription","commits_url":"https://api.github.com/repos/sourcegraph/sourcegraph/commits{/sha}","git_commits_url":"https://api.github.com/repos/sourcegraph/sourcegraph/git/commits{/sha}","comments_url":"https://api.github.com/repos/sourcegraph/sourcegraph/comments{/number}","issue_comment_url":"https://api.github.com/repos/sourcegraph/sourcegraph/issues/comments{/number}","contents_url":"https://api.github.com/repos/sourcegraph/sourcegraph/contents/{+path}","compare_url":"https://api.github.com/repos/sourcegraph/sourcegraph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sourcegraph/sourcegraph/merges","archive_url":"https://api.github.com/repos/sourcegraph/sourcegraph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sourcegraph/sourcegraph/downloads","issues_url":"https://api.github.com/repos/sourcegraph/sourcegraph/issues{/number}","pulls_url":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls{/number}","milestones_url":"https://api.github.com/repos/sourcegraph/sourcegraph/milestones{/number}","notifications_url":"https://api.github.com/repos/sourcegraph/sourcegraph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sourcegraph/sourcegraph/labels{/name}","releases_url":"https://api.github.com/repos/sourcegraph/sourcegraph/releases{/id}","deployments_url":"https://api.github.com/repos/sourcegraph/sourcegraph/deployments","created_at":"2016-06-02T08:17:03Z","updated_at":"2016-06-12T12:52:12Z","pushed_at":"2016-06-14T16:24:19Z","git_url":"git://github.com/sourcegraph/sourcegraph.git","ssh_url":"git@github.com:sourcegraph/sourcegraph.git","clone_url":"https://github.com/sourcegraph/sourcegraph.git","svn_url":"https://github.com/sourcegraph/sourcegraph","homepage":"https://sourcegraph.com","size":107507,"stargazers_count":80,"watchers_count":80,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":18,"forks":6,"open_issues":18,"watchers":80,"default_branch":"master"}},"base":{"label":"sourcegraph:master","ref":"master","sha":"239439a2e92f60e3d5389d6d1e710ef6871221a9","user":{"login":"sourcegraph","id":3979584,"avatar_url":"https://avatars.githubusercontent.com/u/3979584?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcegraph","html_url":"https://github.com/sourcegraph","followers_url":"https://api.github.com/users/sourcegraph/followers","following_url":"https://api.github.com/users/sourcegraph/following{/other_user}","gists_url":"https://api.github.com/users/sourcegraph/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcegraph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcegraph/subscriptions","organizations_url":"https://api.github.com/users/sourcegraph/orgs","repos_url":"https://api.github.com/users/sourcegraph/repos","events_url":"https://api.github.com/users/sourcegraph/events{/privacy}","received_events_url":"https://api.github.com/users/sourcegraph/received_events","type":"Organization","site_admin":false},"repo":{"id":60245511,"name":"sourcegraph","full_name":"sourcegraph/sourcegraph","owner":{"login":"sourcegraph","id":3979584,"avatar_url":"https://avatars.githubusercontent.com/u/3979584?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcegraph","html_url":"https://github.com/sourcegraph","followers_url":"https://api.github.com/users/sourcegraph/followers","following_url":"https://api.github.com/users/sourcegraph/following{/other_user}","gists_url":"https://api.github.com/users/sourcegraph/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcegraph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcegraph/subscriptions","organizations_url":"https://api.github.com/users/sourcegraph/orgs","repos_url":"https://api.github.com/users/sourcegraph/repos","events_url":"https://api.github.com/users/sourcegraph/events{/privacy}","received_events_url":"https://api.github.com/users/sourcegraph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sourcegraph/sourcegraph","description":"Fast, global, semantic code search & cross-reference engine for developers.","fork":false,"url":"https://api.github.com/repos/sourcegraph/sourcegraph","forks_url":"https://api.github.com/repos/sourcegraph/sourcegraph/forks","keys_url":"https://api.github.com/repos/sourcegraph/sourcegraph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sourcegraph/sourcegraph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sourcegraph/sourcegraph/teams","hooks_url":"https://api.github.com/repos/sourcegraph/sourcegraph/hooks","issue_events_url":"https://api.github.com/repos/sourcegraph/sourcegraph/issues/events{/number}","events_url":"https://api.github.com/repos/sourcegraph/sourcegraph/events","assignees_url":"https://api.github.com/repos/sourcegraph/sourcegraph/assignees{/user}","branches_url":"https://api.github.com/repos/sourcegraph/sourcegraph/branches{/branch}","tags_url":"https://api.github.com/repos/sourcegraph/sourcegraph/tags","blobs_url":"https://api.github.com/repos/sourcegraph/sourcegraph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sourcegraph/sourcegraph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sourcegraph/sourcegraph/git/refs{/sha}","trees_url":"https://api.github.com/repos/sourcegraph/sourcegraph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sourcegraph/sourcegraph/statuses/{sha}","languages_url":"https://api.github.com/repos/sourcegraph/sourcegraph/languages","stargazers_url":"https://api.github.com/repos/sourcegraph/sourcegraph/stargazers","contributors_url":"https://api.github.com/repos/sourcegraph/sourcegraph/contributors","subscribers_url":"https://api.github.com/repos/sourcegraph/sourcegraph/subscribers","subscription_url":"https://api.github.com/repos/sourcegraph/sourcegraph/subscription","commits_url":"https://api.github.com/repos/sourcegraph/sourcegraph/commits{/sha}","git_commits_url":"https://api.github.com/repos/sourcegraph/sourcegraph/git/commits{/sha}","comments_url":"https://api.github.com/repos/sourcegraph/sourcegraph/comments{/number}","issue_comment_url":"https://api.github.com/repos/sourcegraph/sourcegraph/issues/comments{/number}","contents_url":"https://api.github.com/repos/sourcegraph/sourcegraph/contents/{+path}","compare_url":"https://api.github.com/repos/sourcegraph/sourcegraph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sourcegraph/sourcegraph/merges","archive_url":"https://api.github.com/repos/sourcegraph/sourcegraph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sourcegraph/sourcegraph/downloads","issues_url":"https://api.github.com/repos/sourcegraph/sourcegraph/issues{/number}","pulls_url":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls{/number}","milestones_url":"https://api.github.com/repos/sourcegraph/sourcegraph/milestones{/number}","notifications_url":"https://api.github.com/repos/sourcegraph/sourcegraph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sourcegraph/sourcegraph/labels{/name}","releases_url":"https://api.github.com/repos/sourcegraph/sourcegraph/releases{/id}","deployments_url":"https://api.github.com/repos/sourcegraph/sourcegraph/deployments","created_at":"2016-06-02T08:17:03Z","updated_at":"2016-06-12T12:52:12Z","pushed_at":"2016-06-14T16:24:19Z","git_url":"git://github.com/sourcegraph/sourcegraph.git","ssh_url":"git@github.com:sourcegraph/sourcegraph.git","clone_url":"https://github.com/sourcegraph/sourcegraph.git","svn_url":"https://github.com/sourcegraph/sourcegraph","homepage":"https://sourcegraph.com","size":107507,"stargazers_count":80,"watchers_count":80,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":18,"forks":6,"open_issues":18,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls/86"},"html":{"href":"https://github.com/sourcegraph/sourcegraph/pull/86"},"issue":{"href":"https://api.github.com/repos/sourcegraph/sourcegraph/issues/86"},"comments":{"href":"https://api.github.com/repos/sourcegraph/sourcegraph/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls/86/comments"},"review_comment":{"href":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls/86/commits"},"statuses":{"href":"https://api.github.com/repos/sourcegraph/sourcegraph/statuses/ece09cf9f85dbfad46c876337eeffd6d58e1ef17"}}}}
{"actor":{"display_login":"KattMingMing"}}