{"action":"created","comment":{"url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/comments/35764912","id":35764912,"diff_hunk":"@@ -68,13 +68,29 @@ openFarmModule.factory('stageService', ['$http', '$q', 'alertsService',\n           data.relationships.pictures.data.length === 0) {\n         stage.pictures = [];\n       } else {\n-        // Figure this out.\n+        mappedIds = data.relationships.pictures.data.map(function (pic) {\n+          return pic.id;\n+        })\n+        stage.pictures = included.filter(function (pic) {\n+          return mappedIds.indexOf(pic.id) !== -1 && pic.type === 'pictures';\n+        }).map(function(pic) {\n+          return pic.attributes;\n+        })\n       }\n       return stage\n     }\n \n+    var getStageWithPromise = function(id) {\n+      return $q(function (resolve, reject) {\n+        $http.get('/api/v1/stages/' + stage.id + '/pictures')","path":"app/assets/javascripts/angular-libs/angular.of.stages.service.js","position":28,"original_position":28,"commit_id":"27d799026a910820570b12f919038d1c3e201663","original_commit_id":"27d799026a910820570b12f919038d1c3e201663","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"'stage' is not defined.","created_at":"2015-07-29T14:29:01Z","updated_at":"2015-07-29T14:29:01Z","html_url":"https://github.com/openfarmcc/OpenFarm/pull/675#discussion_r35764912","pull_request_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/675","_links":{"self":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/comments/35764912"},"html":{"href":"https://github.com/openfarmcc/OpenFarm/pull/675#discussion_r35764912"},"pull_request":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/675"}}},"pull_request":{"url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/675","id":41050661,"html_url":"https://github.com/openfarmcc/OpenFarm/pull/675","diff_url":"https://github.com/openfarmcc/OpenFarm/pull/675.diff","patch_url":"https://github.com/openfarmcc/OpenFarm/pull/675.patch","issue_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/675","number":675,"state":"open","locked":false,"title":"Small fixes","user":{"login":"simonv3","id":485583,"avatar_url":"https://avatars.githubusercontent.com/u/485583?v=3","gravatar_id":"","url":"https://api.github.com/users/simonv3","html_url":"https://github.com/simonv3","followers_url":"https://api.github.com/users/simonv3/followers","following_url":"https://api.github.com/users/simonv3/following{/other_user}","gists_url":"https://api.github.com/users/simonv3/gists{/gist_id}","starred_url":"https://api.github.com/users/simonv3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonv3/subscriptions","organizations_url":"https://api.github.com/users/simonv3/orgs","repos_url":"https://api.github.com/users/simonv3/repos","events_url":"https://api.github.com/users/simonv3/events{/privacy}","received_events_url":"https://api.github.com/users/simonv3/received_events","type":"User","site_admin":false},"body":"# What's Changed\r\n* Checked for Do Not Track\r\n* Clean up image and saving indicator\r\n* Smoothen guide loading\r\n* Add image drop visual\r\n* Add year to case","created_at":"2015-07-28T19:31:08Z","updated_at":"2015-07-29T14:29:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41f7fb7514bc35a4033ae76cfbfacfdec3ba42bf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/675/commits","review_comments_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/675/comments","review_comment_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/675/comments","statuses_url":"https://api.github.com/repos/openfarmcc/OpenFarm/statuses/27d799026a910820570b12f919038d1c3e201663","head":{"label":"simonv3:small-fixes","ref":"small-fixes","sha":"27d799026a910820570b12f919038d1c3e201663","user":{"login":"simonv3","id":485583,"avatar_url":"https://avatars.githubusercontent.com/u/485583?v=3","gravatar_id":"","url":"https://api.github.com/users/simonv3","html_url":"https://github.com/simonv3","followers_url":"https://api.github.com/users/simonv3/followers","following_url":"https://api.github.com/users/simonv3/following{/other_user}","gists_url":"https://api.github.com/users/simonv3/gists{/gist_id}","starred_url":"https://api.github.com/users/simonv3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonv3/subscriptions","organizations_url":"https://api.github.com/users/simonv3/orgs","repos_url":"https://api.github.com/users/simonv3/repos","events_url":"https://api.github.com/users/simonv3/events{/privacy}","received_events_url":"https://api.github.com/users/simonv3/received_events","type":"User","site_admin":false},"repo":{"id":21980604,"name":"OpenFarm","full_name":"simonv3/OpenFarm","owner":{"login":"simonv3","id":485583,"avatar_url":"https://avatars.githubusercontent.com/u/485583?v=3","gravatar_id":"","url":"https://api.github.com/users/simonv3","html_url":"https://github.com/simonv3","followers_url":"https://api.github.com/users/simonv3/followers","following_url":"https://api.github.com/users/simonv3/following{/other_user}","gists_url":"https://api.github.com/users/simonv3/gists{/gist_id}","starred_url":"https://api.github.com/users/simonv3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonv3/subscriptions","organizations_url":"https://api.github.com/users/simonv3/orgs","repos_url":"https://api.github.com/users/simonv3/repos","events_url":"https://api.github.com/users/simonv3/events{/privacy}","received_events_url":"https://api.github.com/users/simonv3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/simonv3/OpenFarm","description":"A free and open database for farming and gardening knowledge. Data will be crowdsourced and rated. Will feature advanced search of the plant database, responsive frontend, forum for community discussion on each entry, and an open API.","fork":true,"url":"https://api.github.com/repos/simonv3/OpenFarm","forks_url":"https://api.github.com/repos/simonv3/OpenFarm/forks","keys_url":"https://api.github.com/repos/simonv3/OpenFarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simonv3/OpenFarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simonv3/OpenFarm/teams","hooks_url":"https://api.github.com/repos/simonv3/OpenFarm/hooks","issue_events_url":"https://api.github.com/repos/simonv3/OpenFarm/issues/events{/number}","events_url":"https://api.github.com/repos/simonv3/OpenFarm/events","assignees_url":"https://api.github.com/repos/simonv3/OpenFarm/assignees{/user}","branches_url":"https://api.github.com/repos/simonv3/OpenFarm/branches{/branch}","tags_url":"https://api.github.com/repos/simonv3/OpenFarm/tags","blobs_url":"https://api.github.com/repos/simonv3/OpenFarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simonv3/OpenFarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simonv3/OpenFarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/simonv3/OpenFarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simonv3/OpenFarm/statuses/{sha}","languages_url":"https://api.github.com/repos/simonv3/OpenFarm/languages","stargazers_url":"https://api.github.com/repos/simonv3/OpenFarm/stargazers","contributors_url":"https://api.github.com/repos/simonv3/OpenFarm/contributors","subscribers_url":"https://api.github.com/repos/simonv3/OpenFarm/subscribers","subscription_url":"https://api.github.com/repos/simonv3/OpenFarm/subscription","commits_url":"https://api.github.com/repos/simonv3/OpenFarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/simonv3/OpenFarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/simonv3/OpenFarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/simonv3/OpenFarm/issues/comments{/number}","contents_url":"https://api.github.com/repos/simonv3/OpenFarm/contents/{+path}","compare_url":"https://api.github.com/repos/simonv3/OpenFarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simonv3/OpenFarm/merges","archive_url":"https://api.github.com/repos/simonv3/OpenFarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simonv3/OpenFarm/downloads","issues_url":"https://api.github.com/repos/simonv3/OpenFarm/issues{/number}","pulls_url":"https://api.github.com/repos/simonv3/OpenFarm/pulls{/number}","milestones_url":"https://api.github.com/repos/simonv3/OpenFarm/milestones{/number}","notifications_url":"https://api.github.com/repos/simonv3/OpenFarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simonv3/OpenFarm/labels{/name}","releases_url":"https://api.github.com/repos/simonv3/OpenFarm/releases{/id}","created_at":"2014-07-18T13:09:02Z","updated_at":"2015-05-06T06:40:22Z","pushed_at":"2015-07-29T00:46:07Z","git_url":"git://github.com/simonv3/OpenFarm.git","ssh_url":"git@github.com:simonv3/OpenFarm.git","clone_url":"https://github.com/simonv3/OpenFarm.git","svn_url":"https://github.com/simonv3/OpenFarm","homepage":"OpenFarm.cc","size":74618,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"openfarmcc:master","ref":"master","sha":"7c5dcc1498820dac960f7a8c61bc4057993d9b8f","user":{"login":"openfarmcc","id":10136787,"avatar_url":"https://avatars.githubusercontent.com/u/10136787?v=3","gravatar_id":"","url":"https://api.github.com/users/openfarmcc","html_url":"https://github.com/openfarmcc","followers_url":"https://api.github.com/users/openfarmcc/followers","following_url":"https://api.github.com/users/openfarmcc/following{/other_user}","gists_url":"https://api.github.com/users/openfarmcc/gists{/gist_id}","starred_url":"https://api.github.com/users/openfarmcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfarmcc/subscriptions","organizations_url":"https://api.github.com/users/openfarmcc/orgs","repos_url":"https://api.github.com/users/openfarmcc/repos","events_url":"https://api.github.com/users/openfarmcc/events{/privacy}","received_events_url":"https://api.github.com/users/openfarmcc/received_events","type":"Organization","site_admin":false},"repo":{"id":13895958,"name":"OpenFarm","full_name":"openfarmcc/OpenFarm","owner":{"login":"openfarmcc","id":10136787,"avatar_url":"https://avatars.githubusercontent.com/u/10136787?v=3","gravatar_id":"","url":"https://api.github.com/users/openfarmcc","html_url":"https://github.com/openfarmcc","followers_url":"https://api.github.com/users/openfarmcc/followers","following_url":"https://api.github.com/users/openfarmcc/following{/other_user}","gists_url":"https://api.github.com/users/openfarmcc/gists{/gist_id}","starred_url":"https://api.github.com/users/openfarmcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfarmcc/subscriptions","organizations_url":"https://api.github.com/users/openfarmcc/orgs","repos_url":"https://api.github.com/users/openfarmcc/repos","events_url":"https://api.github.com/users/openfarmcc/events{/privacy}","received_events_url":"https://api.github.com/users/openfarmcc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openfarmcc/OpenFarm","description":"A free and open database for farming and gardening knowledge. You can grow anything!","fork":false,"url":"https://api.github.com/repos/openfarmcc/OpenFarm","forks_url":"https://api.github.com/repos/openfarmcc/OpenFarm/forks","keys_url":"https://api.github.com/repos/openfarmcc/OpenFarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfarmcc/OpenFarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfarmcc/OpenFarm/teams","hooks_url":"https://api.github.com/repos/openfarmcc/OpenFarm/hooks","issue_events_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/events{/number}","events_url":"https://api.github.com/repos/openfarmcc/OpenFarm/events","assignees_url":"https://api.github.com/repos/openfarmcc/OpenFarm/assignees{/user}","branches_url":"https://api.github.com/repos/openfarmcc/OpenFarm/branches{/branch}","tags_url":"https://api.github.com/repos/openfarmcc/OpenFarm/tags","blobs_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfarmcc/OpenFarm/statuses/{sha}","languages_url":"https://api.github.com/repos/openfarmcc/OpenFarm/languages","stargazers_url":"https://api.github.com/repos/openfarmcc/OpenFarm/stargazers","contributors_url":"https://api.github.com/repos/openfarmcc/OpenFarm/contributors","subscribers_url":"https://api.github.com/repos/openfarmcc/OpenFarm/subscribers","subscription_url":"https://api.github.com/repos/openfarmcc/OpenFarm/subscription","commits_url":"https://api.github.com/repos/openfarmcc/OpenFarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfarmcc/OpenFarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfarmcc/OpenFarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfarmcc/OpenFarm/contents/{+path}","compare_url":"https://api.github.com/repos/openfarmcc/OpenFarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfarmcc/OpenFarm/merges","archive_url":"https://api.github.com/repos/openfarmcc/OpenFarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfarmcc/OpenFarm/downloads","issues_url":"https://api.github.com/repos/openfarmcc/OpenFarm/issues{/number}","pulls_url":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls{/number}","milestones_url":"https://api.github.com/repos/openfarmcc/OpenFarm/milestones{/number}","notifications_url":"https://api.github.com/repos/openfarmcc/OpenFarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfarmcc/OpenFarm/labels{/name}","releases_url":"https://api.github.com/repos/openfarmcc/OpenFarm/releases{/id}","created_at":"2013-10-27T04:46:37Z","updated_at":"2015-07-15T00:33:39Z","pushed_at":"2015-07-29T00:46:08Z","git_url":"git://github.com/openfarmcc/OpenFarm.git","ssh_url":"git@github.com:openfarmcc/OpenFarm.git","clone_url":"https://github.com/openfarmcc/OpenFarm.git","svn_url":"https://github.com/openfarmcc/OpenFarm","homepage":"https://OpenFarm.cc","size":76028,"stargazers_count":261,"watchers_count":261,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":66,"mirror_url":null,"open_issues_count":52,"forks":66,"open_issues":52,"watchers":261,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/675"},"html":{"href":"https://github.com/openfarmcc/OpenFarm/pull/675"},"issue":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/675"},"comments":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/issues/675/comments"},"review_comments":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/675/comments"},"review_comment":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/pulls/675/commits"},"statuses":{"href":"https://api.github.com/repos/openfarmcc/OpenFarm/statuses/27d799026a910820570b12f919038d1c3e201663"}}}}