GitHub PullRequestReviewCommentEvent at 2014-11-12 18:09:01
Repository: dosomething
Actor: aaronschachter
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments/20237412","id":20237412,"diff_hunk":"@@ -243,9 +256,28 @@ function dosomething_reportback_form_save_file(&$form_state) {\n   // Make the storage of the file permanent.\n   $file->status = FILE_STATUS_PERMANENT;\n   file_save($file);\n+  // @TODO - only if cropping is active.\n+  // Grab cropping information.\n+  $crop_x = $form_state['values']['crop_x'];\n+  $crop_y = $form_state['values']['crop_y'];\n+  $crop_width = $form_state['values']['crop_width'];\n+  $crop_height = $form_state['values']['crop_height'];\n+  // Crop the image.\n+  dosomething_reportback_image_crop($file,$crop_x,$crop_y,$crop_width,$crop_height);\n   return $file;\n }\n \n+// Function to crop image.\n+function dosomething_reportback_image_crop($file,$crop_x,$crop_y,$crop_width,$crop_height) {","path":"lib/modules/dosomething/dosomething_reportback/dosomething_reportback.forms.inc","position":36,"original_position":36,"commit_id":"11cc3ca88e38812674b18eb4c1ea0858bfc71b99","original_commit_id":"11cc3ca88e38812674b18eb4c1ea0858bfc71b99","user":{"login":"aaronschachter","id":1236811,"avatar_url":"https://avatars.githubusercontent.com/u/1236811?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronschachter","html_url":"https://github.com/aaronschachter","followers_url":"https://api.github.com/users/aaronschachter/followers","following_url":"https://api.github.com/users/aaronschachter/following{/other_user}","gists_url":"https://api.github.com/users/aaronschachter/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronschachter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronschachter/subscriptions","organizations_url":"https://api.github.com/users/aaronschachter/orgs","repos_url":"https://api.github.com/users/aaronschachter/repos","events_url":"https://api.github.com/users/aaronschachter/events{/privacy}","received_events_url":"https://api.github.com/users/aaronschachter/received_events","type":"User","site_admin":false},"body":"I'd recommend just using the same params as `image_crop` to make this a little more readable.  Also, params should have spaces.\r\n````\r\nfunction image_crop(stdClass $image, $x, $y, $width, $height)\r\n````","created_at":"2014-11-12T18:09:01Z","updated_at":"2014-11-12T18:09:01Z","html_url":"https://github.com/DoSomething/dosomething/pull/3399#discussion_r20237412","pull_request_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/3399","_links":{"self":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments/20237412"},"html":{"href":"https://github.com/DoSomething/dosomething/pull/3399#discussion_r20237412"},"pull_request":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/3399"}}},"pull_request":{"url":"https://api.github.com/repos/DoSomething/dosomething/pulls/3399","id":24311753,"html_url":"https://github.com/DoSomething/dosomething/pull/3399","diff_url":"https://github.com/DoSomething/dosomething/pull/3399.diff","patch_url":"https://github.com/DoSomething/dosomething/pull/3399.patch","issue_url":"https://api.github.com/repos/DoSomething/dosomething/issues/3399","number":3399,"state":"open","locked":false,"title":"Reportback form cropping","user":{"login":"sbsmith86","id":1700409,"avatar_url":"https://avatars.githubusercontent.com/u/1700409?v=3","gravatar_id":"","url":"https://api.github.com/users/sbsmith86","html_url":"https://github.com/sbsmith86","followers_url":"https://api.github.com/users/sbsmith86/followers","following_url":"https://api.github.com/users/sbsmith86/following{/other_user}","gists_url":"https://api.github.com/users/sbsmith86/gists{/gist_id}","starred_url":"https://api.github.com/users/sbsmith86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbsmith86/subscriptions","organizations_url":"https://api.github.com/users/sbsmith86/orgs","repos_url":"https://api.github.com/users/sbsmith86/repos","events_url":"https://api.github.com/users/sbsmith86/events{/privacy}","received_events_url":"https://api.github.com/users/sbsmith86/received_events","type":"User","site_admin":false},"body":"@aaronschachter Wanted to send a pull request so you can start check out some of the module level code I added. \r\n\r\n:warning:  Most of this code (especially the js) is not production ready!! Just want to start getting eyes on this so we can move it to staging to start testing on devices. ","created_at":"2014-11-12T17:58:48Z","updated_at":"2014-11-12T18:09:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb426b8e58d56540e712d8332c259bbbba3ee961","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/3399/commits","review_comments_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/3399/comments","review_comment_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments/{number}","comments_url":"https://api.github.com/repos/DoSomething/dosomething/issues/3399/comments","statuses_url":"https://api.github.com/repos/DoSomething/dosomething/statuses/11cc3ca88e38812674b18eb4c1ea0858bfc71b99","head":{"label":"sbsmith86:reportback-form-cropping","ref":"reportback-form-cropping","sha":"11cc3ca88e38812674b18eb4c1ea0858bfc71b99","user":{"login":"sbsmith86","id":1700409,"avatar_url":"https://avatars.githubusercontent.com/u/1700409?v=3","gravatar_id":"","url":"https://api.github.com/users/sbsmith86","html_url":"https://github.com/sbsmith86","followers_url":"https://api.github.com/users/sbsmith86/followers","following_url":"https://api.github.com/users/sbsmith86/following{/other_user}","gists_url":"https://api.github.com/users/sbsmith86/gists{/gist_id}","starred_url":"https://api.github.com/users/sbsmith86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbsmith86/subscriptions","organizations_url":"https://api.github.com/users/sbsmith86/orgs","repos_url":"https://api.github.com/users/sbsmith86/repos","events_url":"https://api.github.com/users/sbsmith86/events{/privacy}","received_events_url":"https://api.github.com/users/sbsmith86/received_events","type":"User","site_admin":false},"repo":{"id":25887312,"name":"dosomething","full_name":"sbsmith86/dosomething","owner":{"login":"sbsmith86","id":1700409,"avatar_url":"https://avatars.githubusercontent.com/u/1700409?v=3","gravatar_id":"","url":"https://api.github.com/users/sbsmith86","html_url":"https://github.com/sbsmith86","followers_url":"https://api.github.com/users/sbsmith86/followers","following_url":"https://api.github.com/users/sbsmith86/following{/other_user}","gists_url":"https://api.github.com/users/sbsmith86/gists{/gist_id}","starred_url":"https://api.github.com/users/sbsmith86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbsmith86/subscriptions","organizations_url":"https://api.github.com/users/sbsmith86/orgs","repos_url":"https://api.github.com/users/sbsmith86/repos","events_url":"https://api.github.com/users/sbsmith86/events{/privacy}","received_events_url":"https://api.github.com/users/sbsmith86/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sbsmith86/dosomething","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":true,"url":"https://api.github.com/repos/sbsmith86/dosomething","forks_url":"https://api.github.com/repos/sbsmith86/dosomething/forks","keys_url":"https://api.github.com/repos/sbsmith86/dosomething/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sbsmith86/dosomething/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sbsmith86/dosomething/teams","hooks_url":"https://api.github.com/repos/sbsmith86/dosomething/hooks","issue_events_url":"https://api.github.com/repos/sbsmith86/dosomething/issues/events{/number}","events_url":"https://api.github.com/repos/sbsmith86/dosomething/events","assignees_url":"https://api.github.com/repos/sbsmith86/dosomething/assignees{/user}","branches_url":"https://api.github.com/repos/sbsmith86/dosomething/branches{/branch}","tags_url":"https://api.github.com/repos/sbsmith86/dosomething/tags","blobs_url":"https://api.github.com/repos/sbsmith86/dosomething/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sbsmith86/dosomething/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sbsmith86/dosomething/git/refs{/sha}","trees_url":"https://api.github.com/repos/sbsmith86/dosomething/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sbsmith86/dosomething/statuses/{sha}","languages_url":"https://api.github.com/repos/sbsmith86/dosomething/languages","stargazers_url":"https://api.github.com/repos/sbsmith86/dosomething/stargazers","contributors_url":"https://api.github.com/repos/sbsmith86/dosomething/contributors","subscribers_url":"https://api.github.com/repos/sbsmith86/dosomething/subscribers","subscription_url":"https://api.github.com/repos/sbsmith86/dosomething/subscription","commits_url":"https://api.github.com/repos/sbsmith86/dosomething/commits{/sha}","git_commits_url":"https://api.github.com/repos/sbsmith86/dosomething/git/commits{/sha}","comments_url":"https://api.github.com/repos/sbsmith86/dosomething/comments{/number}","issue_comment_url":"https://api.github.com/repos/sbsmith86/dosomething/issues/comments/{number}","contents_url":"https://api.github.com/repos/sbsmith86/dosomething/contents/{+path}","compare_url":"https://api.github.com/repos/sbsmith86/dosomething/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sbsmith86/dosomething/merges","archive_url":"https://api.github.com/repos/sbsmith86/dosomething/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sbsmith86/dosomething/downloads","issues_url":"https://api.github.com/repos/sbsmith86/dosomething/issues{/number}","pulls_url":"https://api.github.com/repos/sbsmith86/dosomething/pulls{/number}","milestones_url":"https://api.github.com/repos/sbsmith86/dosomething/milestones{/number}","notifications_url":"https://api.github.com/repos/sbsmith86/dosomething/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sbsmith86/dosomething/labels{/name}","releases_url":"https://api.github.com/repos/sbsmith86/dosomething/releases{/id}","created_at":"2014-10-28T19:53:11Z","updated_at":"2014-10-31T15:57:12Z","pushed_at":"2014-11-12T17:55:53Z","git_url":"git://github.com/sbsmith86/dosomething.git","ssh_url":"git@github.com:sbsmith86/dosomething.git","clone_url":"https://github.com/sbsmith86/dosomething.git","svn_url":"https://github.com/sbsmith86/dosomething","homepage":"http://www.dosomething.org/","size":10030,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"dev"}},"base":{"label":"DoSomething:dev","ref":"dev","sha":"8b1d67345a79d52e1d0b5b8656973ea6c646fa8f","user":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":13592927,"name":"dosomething","full_name":"DoSomething/dosomething","owner":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoSomething/dosomething","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":false,"url":"https://api.github.com/repos/DoSomething/dosomething","forks_url":"https://api.github.com/repos/DoSomething/dosomething/forks","keys_url":"https://api.github.com/repos/DoSomething/dosomething/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/dosomething/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/dosomething/teams","hooks_url":"https://api.github.com/repos/DoSomething/dosomething/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/dosomething/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/dosomething/events","assignees_url":"https://api.github.com/repos/DoSomething/dosomething/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/dosomething/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/dosomething/tags","blobs_url":"https://api.github.com/repos/DoSomething/dosomething/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/dosomething/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/dosomething/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/dosomething/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/dosomething/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/dosomething/languages","stargazers_url":"https://api.github.com/repos/DoSomething/dosomething/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/dosomething/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/dosomething/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/dosomething/subscription","commits_url":"https://api.github.com/repos/DoSomething/dosomething/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/dosomething/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/dosomething/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/dosomething/issues/comments/{number}","contents_url":"https://api.github.com/repos/DoSomething/dosomething/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/dosomething/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/dosomething/merges","archive_url":"https://api.github.com/repos/DoSomething/dosomething/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/dosomething/downloads","issues_url":"https://api.github.com/repos/DoSomething/dosomething/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/dosomething/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/dosomething/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/dosomething/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/dosomething/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/dosomething/releases{/id}","created_at":"2013-10-15T14:50:48Z","updated_at":"2014-10-29T15:53:21Z","pushed_at":"2014-11-12T15:14:45Z","git_url":"git://github.com/DoSomething/dosomething.git","ssh_url":"git@github.com:DoSomething/dosomething.git","clone_url":"https://github.com/DoSomething/dosomething.git","svn_url":"https://github.com/DoSomething/dosomething","homepage":"http://www.dosomething.org/","size":42329,"stargazers_count":17,"watchers_count":17,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":183,"forks":11,"open_issues":183,"watchers":17,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/3399"},"html":{"href":"https://github.com/DoSomething/dosomething/pull/3399"},"issue":{"href":"https://api.github.com/repos/DoSomething/dosomething/issues/3399"},"comments":{"href":"https://api.github.com/repos/DoSomething/dosomething/issues/3399/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/3399/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/3399/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/dosomething/statuses/11cc3ca88e38812674b18eb4c1ea0858bfc71b99"}}}}