{"action":"created","comment":{"url":"https://api.github.com/repos/wwoof/webapp/pulls/comments/31387925","id":31387925,"diff_hunk":"@@ -0,0 +1,44 @@\n+/**\n+ * Ember controller for wwoofer photo edition.\n+ */\n+import Ember from 'ember';\n+import ValidationsMixin from '../../mixins/validations';\n+\n+export default Ember.Controller.extend(ValidationsMixin, {\n+\n+    /**\n+     * The data-url to send the photo to.\n+     */\n+    photoDataUrl: function () {\n+        return 'api/users/' + this.get('model.user.id') + '/photo';\n+    }.property('model.user.id'),\n+\n+    actions: {\n+        deletePhoto: function () {\n+            var self = this;\n+            return new Ember.RSVP.Promise(function(resolve, reject) {\n+\n+                // Get user\n+                var user = self.get('model.user');\n+\n+                // Impersonate the user","path":"app/controllers/wwoofer/photo.js","position":24,"original_position":24,"commit_id":"20c6a484b97c5cceb6b6d1538c11368142182a64","original_commit_id":"20c6a484b97c5cceb6b6d1538c11368142182a64","user":{"login":"gzurbach","id":795927,"avatar_url":"https://avatars.githubusercontent.com/u/795927?v=3","gravatar_id":"","url":"https://api.github.com/users/gzurbach","html_url":"https://github.com/gzurbach","followers_url":"https://api.github.com/users/gzurbach/followers","following_url":"https://api.github.com/users/gzurbach/following{/other_user}","gists_url":"https://api.github.com/users/gzurbach/gists{/gist_id}","starred_url":"https://api.github.com/users/gzurbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gzurbach/subscriptions","organizations_url":"https://api.github.com/users/gzurbach/orgs","repos_url":"https://api.github.com/users/gzurbach/repos","events_url":"https://api.github.com/users/gzurbach/events{/privacy}","received_events_url":"https://api.github.com/users/gzurbach/received_events","type":"User","site_admin":false},"body":"Incorrect comment","created_at":"2015-05-31T07:59:27Z","updated_at":"2015-05-31T07:59:27Z","html_url":"https://github.com/wwoof/webapp/pull/157#discussion_r31387925","pull_request_url":"https://api.github.com/repos/wwoof/webapp/pulls/157","_links":{"self":{"href":"https://api.github.com/repos/wwoof/webapp/pulls/comments/31387925"},"html":{"href":"https://github.com/wwoof/webapp/pull/157#discussion_r31387925"},"pull_request":{"href":"https://api.github.com/repos/wwoof/webapp/pulls/157"}}},"pull_request":{"url":"https://api.github.com/repos/wwoof/webapp/pulls/157","id":36576824,"html_url":"https://github.com/wwoof/webapp/pull/157","diff_url":"https://github.com/wwoof/webapp/pull/157.diff","patch_url":"https://github.com/wwoof/webapp/pull/157.patch","issue_url":"https://api.github.com/repos/wwoof/webapp/issues/157","number":157,"state":"open","locked":false,"title":"Feature/user photo","user":{"login":"Chinow","id":1569362,"avatar_url":"https://avatars.githubusercontent.com/u/1569362?v=3","gravatar_id":"","url":"https://api.github.com/users/Chinow","html_url":"https://github.com/Chinow","followers_url":"https://api.github.com/users/Chinow/followers","following_url":"https://api.github.com/users/Chinow/following{/other_user}","gists_url":"https://api.github.com/users/Chinow/gists{/gist_id}","starred_url":"https://api.github.com/users/Chinow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chinow/subscriptions","organizations_url":"https://api.github.com/users/Chinow/orgs","repos_url":"https://api.github.com/users/Chinow/repos","events_url":"https://api.github.com/users/Chinow/events{/privacy}","received_events_url":"https://api.github.com/users/Chinow/received_events","type":"User","site_admin":false},"body":"Add profile photo for wwoofers\r\n\r\nfix #149\r\n","created_at":"2015-05-31T04:38:03Z","updated_at":"2015-05-31T07:59:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d80ba13533e30e9503d29f683032b9cfafe96052","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wwoof/webapp/pulls/157/commits","review_comments_url":"https://api.github.com/repos/wwoof/webapp/pulls/157/comments","review_comment_url":"https://api.github.com/repos/wwoof/webapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wwoof/webapp/issues/157/comments","statuses_url":"https://api.github.com/repos/wwoof/webapp/statuses/20c6a484b97c5cceb6b6d1538c11368142182a64","head":{"label":"wwoof:feature/user-photo","ref":"feature/user-photo","sha":"20c6a484b97c5cceb6b6d1538c11368142182a64","user":{"login":"wwoof","id":7192171,"avatar_url":"https://avatars.githubusercontent.com/u/7192171?v=3","gravatar_id":"","url":"https://api.github.com/users/wwoof","html_url":"https://github.com/wwoof","followers_url":"https://api.github.com/users/wwoof/followers","following_url":"https://api.github.com/users/wwoof/following{/other_user}","gists_url":"https://api.github.com/users/wwoof/gists{/gist_id}","starred_url":"https://api.github.com/users/wwoof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwoof/subscriptions","organizations_url":"https://api.github.com/users/wwoof/orgs","repos_url":"https://api.github.com/users/wwoof/repos","events_url":"https://api.github.com/users/wwoof/events{/privacy}","received_events_url":"https://api.github.com/users/wwoof/received_events","type":"Organization","site_admin":false},"repo":{"id":18477012,"name":"webapp","full_name":"wwoof/webapp","owner":{"login":"wwoof","id":7192171,"avatar_url":"https://avatars.githubusercontent.com/u/7192171?v=3","gravatar_id":"","url":"https://api.github.com/users/wwoof","html_url":"https://github.com/wwoof","followers_url":"https://api.github.com/users/wwoof/followers","following_url":"https://api.github.com/users/wwoof/following{/other_user}","gists_url":"https://api.github.com/users/wwoof/gists{/gist_id}","starred_url":"https://api.github.com/users/wwoof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwoof/subscriptions","organizations_url":"https://api.github.com/users/wwoof/orgs","repos_url":"https://api.github.com/users/wwoof/repos","events_url":"https://api.github.com/users/wwoof/events{/privacy}","received_events_url":"https://api.github.com/users/wwoof/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wwoof/webapp","description":"Web application of the WWOOF France Association","fork":false,"url":"https://api.github.com/repos/wwoof/webapp","forks_url":"https://api.github.com/repos/wwoof/webapp/forks","keys_url":"https://api.github.com/repos/wwoof/webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wwoof/webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wwoof/webapp/teams","hooks_url":"https://api.github.com/repos/wwoof/webapp/hooks","issue_events_url":"https://api.github.com/repos/wwoof/webapp/issues/events{/number}","events_url":"https://api.github.com/repos/wwoof/webapp/events","assignees_url":"https://api.github.com/repos/wwoof/webapp/assignees{/user}","branches_url":"https://api.github.com/repos/wwoof/webapp/branches{/branch}","tags_url":"https://api.github.com/repos/wwoof/webapp/tags","blobs_url":"https://api.github.com/repos/wwoof/webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wwoof/webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wwoof/webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/wwoof/webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wwoof/webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/wwoof/webapp/languages","stargazers_url":"https://api.github.com/repos/wwoof/webapp/stargazers","contributors_url":"https://api.github.com/repos/wwoof/webapp/contributors","subscribers_url":"https://api.github.com/repos/wwoof/webapp/subscribers","subscription_url":"https://api.github.com/repos/wwoof/webapp/subscription","commits_url":"https://api.github.com/repos/wwoof/webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/wwoof/webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/wwoof/webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/wwoof/webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/wwoof/webapp/contents/{+path}","compare_url":"https://api.github.com/repos/wwoof/webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wwoof/webapp/merges","archive_url":"https://api.github.com/repos/wwoof/webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wwoof/webapp/downloads","issues_url":"https://api.github.com/repos/wwoof/webapp/issues{/number}","pulls_url":"https://api.github.com/repos/wwoof/webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/wwoof/webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/wwoof/webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wwoof/webapp/labels{/name}","releases_url":"https://api.github.com/repos/wwoof/webapp/releases{/id}","created_at":"2014-04-05T21:26:25Z","updated_at":"2015-05-24T10:06:24Z","pushed_at":"2015-05-31T04:38:03Z","git_url":"git://github.com/wwoof/webapp.git","ssh_url":"git@github.com:wwoof/webapp.git","clone_url":"https://github.com/wwoof/webapp.git","svn_url":"https://github.com/wwoof/webapp","homepage":"https://app.wwoof.fr","size":3016,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":23,"forks":5,"open_issues":23,"watchers":10,"default_branch":"master"}},"base":{"label":"wwoof:master","ref":"master","sha":"ec20d5549635d4acd891aa5a6ddd1eda7a932509","user":{"login":"wwoof","id":7192171,"avatar_url":"https://avatars.githubusercontent.com/u/7192171?v=3","gravatar_id":"","url":"https://api.github.com/users/wwoof","html_url":"https://github.com/wwoof","followers_url":"https://api.github.com/users/wwoof/followers","following_url":"https://api.github.com/users/wwoof/following{/other_user}","gists_url":"https://api.github.com/users/wwoof/gists{/gist_id}","starred_url":"https://api.github.com/users/wwoof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwoof/subscriptions","organizations_url":"https://api.github.com/users/wwoof/orgs","repos_url":"https://api.github.com/users/wwoof/repos","events_url":"https://api.github.com/users/wwoof/events{/privacy}","received_events_url":"https://api.github.com/users/wwoof/received_events","type":"Organization","site_admin":false},"repo":{"id":18477012,"name":"webapp","full_name":"wwoof/webapp","owner":{"login":"wwoof","id":7192171,"avatar_url":"https://avatars.githubusercontent.com/u/7192171?v=3","gravatar_id":"","url":"https://api.github.com/users/wwoof","html_url":"https://github.com/wwoof","followers_url":"https://api.github.com/users/wwoof/followers","following_url":"https://api.github.com/users/wwoof/following{/other_user}","gists_url":"https://api.github.com/users/wwoof/gists{/gist_id}","starred_url":"https://api.github.com/users/wwoof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwoof/subscriptions","organizations_url":"https://api.github.com/users/wwoof/orgs","repos_url":"https://api.github.com/users/wwoof/repos","events_url":"https://api.github.com/users/wwoof/events{/privacy}","received_events_url":"https://api.github.com/users/wwoof/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wwoof/webapp","description":"Web application of the WWOOF France Association","fork":false,"url":"https://api.github.com/repos/wwoof/webapp","forks_url":"https://api.github.com/repos/wwoof/webapp/forks","keys_url":"https://api.github.com/repos/wwoof/webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wwoof/webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wwoof/webapp/teams","hooks_url":"https://api.github.com/repos/wwoof/webapp/hooks","issue_events_url":"https://api.github.com/repos/wwoof/webapp/issues/events{/number}","events_url":"https://api.github.com/repos/wwoof/webapp/events","assignees_url":"https://api.github.com/repos/wwoof/webapp/assignees{/user}","branches_url":"https://api.github.com/repos/wwoof/webapp/branches{/branch}","tags_url":"https://api.github.com/repos/wwoof/webapp/tags","blobs_url":"https://api.github.com/repos/wwoof/webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wwoof/webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wwoof/webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/wwoof/webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wwoof/webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/wwoof/webapp/languages","stargazers_url":"https://api.github.com/repos/wwoof/webapp/stargazers","contributors_url":"https://api.github.com/repos/wwoof/webapp/contributors","subscribers_url":"https://api.github.com/repos/wwoof/webapp/subscribers","subscription_url":"https://api.github.com/repos/wwoof/webapp/subscription","commits_url":"https://api.github.com/repos/wwoof/webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/wwoof/webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/wwoof/webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/wwoof/webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/wwoof/webapp/contents/{+path}","compare_url":"https://api.github.com/repos/wwoof/webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wwoof/webapp/merges","archive_url":"https://api.github.com/repos/wwoof/webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wwoof/webapp/downloads","issues_url":"https://api.github.com/repos/wwoof/webapp/issues{/number}","pulls_url":"https://api.github.com/repos/wwoof/webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/wwoof/webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/wwoof/webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wwoof/webapp/labels{/name}","releases_url":"https://api.github.com/repos/wwoof/webapp/releases{/id}","created_at":"2014-04-05T21:26:25Z","updated_at":"2015-05-24T10:06:24Z","pushed_at":"2015-05-31T04:38:03Z","git_url":"git://github.com/wwoof/webapp.git","ssh_url":"git@github.com:wwoof/webapp.git","clone_url":"https://github.com/wwoof/webapp.git","svn_url":"https://github.com/wwoof/webapp","homepage":"https://app.wwoof.fr","size":3016,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":23,"forks":5,"open_issues":23,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wwoof/webapp/pulls/157"},"html":{"href":"https://github.com/wwoof/webapp/pull/157"},"issue":{"href":"https://api.github.com/repos/wwoof/webapp/issues/157"},"comments":{"href":"https://api.github.com/repos/wwoof/webapp/issues/157/comments"},"review_comments":{"href":"https://api.github.com/repos/wwoof/webapp/pulls/157/comments"},"review_comment":{"href":"https://api.github.com/repos/wwoof/webapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wwoof/webapp/pulls/157/commits"},"statuses":{"href":"https://api.github.com/repos/wwoof/webapp/statuses/20c6a484b97c5cceb6b6d1538c11368142182a64"}}}}