{"action":"created","comment":{"url":"https://api.github.com/repos/rosedu/events/pulls/comments/27771306","id":27771306,"diff_hunk":"@@ -0,0 +1,32 @@\n+var Edition = require('../config/models/activity').edition\n+var Activity = require('../config/models/activity').activity\n+var mongoose = require('mongoose')\n+\n+exports.index = function(req, res) {\n+  Edition.find().exec(gotEditions)\n+\n+  function gotEditions(err, editions) {\n+\n+    Activity.find().exec(gotActivities)\n+\n+    function gotActivities(err, activities) {\n+\n+      res.render('editions', {\n+        'editions': editions,\n+        'activities': activities\n+      })\n+    }\n+  }\n+}\n+\n+exports.add = function(req, res) {\n+  var new_edition = {\n+    name:      req.body.name,\n+    description: req.body.description\n+  }\n+\n+  Activity.update( {'_id':  mongoose.Types.ObjectId.fromString(req.body.activity_id) }, {$push:{edition: new Edition(new_edition) } }  ).exec()\n+\n+  new Edition(new_edition).save()","path":"routes/editions.js","position":30,"original_position":30,"commit_id":"ea4afb7650025e945e91663600a4b2fb03e8a581","original_commit_id":"ea4afb7650025e945e91663600a4b2fb03e8a581","user":{"login":"maria","id":1681405,"avatar_url":"https://avatars.githubusercontent.com/u/1681405?v=3","gravatar_id":"","url":"https://api.github.com/users/maria","html_url":"https://github.com/maria","followers_url":"https://api.github.com/users/maria/followers","following_url":"https://api.github.com/users/maria/following{/other_user}","gists_url":"https://api.github.com/users/maria/gists{/gist_id}","starred_url":"https://api.github.com/users/maria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maria/subscriptions","organizations_url":"https://api.github.com/users/maria/orgs","repos_url":"https://api.github.com/users/maria/repos","events_url":"https://api.github.com/users/maria/events{/privacy}","received_events_url":"https://api.github.com/users/maria/received_events","type":"User","site_admin":false},"body":"Hint: Check for errors and display to the user those who are of interest.","created_at":"2015-04-04T19:19:34Z","updated_at":"2015-04-04T19:19:34Z","html_url":"https://github.com/rosedu/events/pull/44#discussion_r27771306","pull_request_url":"https://api.github.com/repos/rosedu/events/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/rosedu/events/pulls/comments/27771306"},"html":{"href":"https://github.com/rosedu/events/pull/44#discussion_r27771306"},"pull_request":{"href":"https://api.github.com/repos/rosedu/events/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/rosedu/events/pulls/44","id":32632485,"html_url":"https://github.com/rosedu/events/pull/44","diff_url":"https://github.com/rosedu/events/pull/44.diff","patch_url":"https://github.com/rosedu/events/pull/44.patch","issue_url":"https://api.github.com/repos/rosedu/events/issues/44","number":44,"state":"open","locked":false,"title":"Add editions and update activities","user":{"login":"Aleks23","id":5629628,"avatar_url":"https://avatars.githubusercontent.com/u/5629628?v=3","gravatar_id":"","url":"https://api.github.com/users/Aleks23","html_url":"https://github.com/Aleks23","followers_url":"https://api.github.com/users/Aleks23/followers","following_url":"https://api.github.com/users/Aleks23/following{/other_user}","gists_url":"https://api.github.com/users/Aleks23/gists{/gist_id}","starred_url":"https://api.github.com/users/Aleks23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aleks23/subscriptions","organizations_url":"https://api.github.com/users/Aleks23/orgs","repos_url":"https://api.github.com/users/Aleks23/repos","events_url":"https://api.github.com/users/Aleks23/events{/privacy}","received_events_url":"https://api.github.com/users/Aleks23/received_events","type":"User","site_admin":false},"body":"Further development for  https://github.com/rosedu/events/pull/43","created_at":"2015-04-04T11:39:18Z","updated_at":"2015-04-04T19:19:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"45ba08983c2e30b6fd20c7b632b827e1659028e8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rosedu/events/pulls/44/commits","review_comments_url":"https://api.github.com/repos/rosedu/events/pulls/44/comments","review_comment_url":"https://api.github.com/repos/rosedu/events/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rosedu/events/issues/44/comments","statuses_url":"https://api.github.com/repos/rosedu/events/statuses/ea4afb7650025e945e91663600a4b2fb03e8a581","head":{"label":"Aleks23:39-model-database","ref":"39-model-database","sha":"ea4afb7650025e945e91663600a4b2fb03e8a581","user":{"login":"Aleks23","id":5629628,"avatar_url":"https://avatars.githubusercontent.com/u/5629628?v=3","gravatar_id":"","url":"https://api.github.com/users/Aleks23","html_url":"https://github.com/Aleks23","followers_url":"https://api.github.com/users/Aleks23/followers","following_url":"https://api.github.com/users/Aleks23/following{/other_user}","gists_url":"https://api.github.com/users/Aleks23/gists{/gist_id}","starred_url":"https://api.github.com/users/Aleks23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aleks23/subscriptions","organizations_url":"https://api.github.com/users/Aleks23/orgs","repos_url":"https://api.github.com/users/Aleks23/repos","events_url":"https://api.github.com/users/Aleks23/events{/privacy}","received_events_url":"https://api.github.com/users/Aleks23/received_events","type":"User","site_admin":false},"repo":{"id":33067278,"name":"events","full_name":"Aleks23/events","owner":{"login":"Aleks23","id":5629628,"avatar_url":"https://avatars.githubusercontent.com/u/5629628?v=3","gravatar_id":"","url":"https://api.github.com/users/Aleks23","html_url":"https://github.com/Aleks23","followers_url":"https://api.github.com/users/Aleks23/followers","following_url":"https://api.github.com/users/Aleks23/following{/other_user}","gists_url":"https://api.github.com/users/Aleks23/gists{/gist_id}","starred_url":"https://api.github.com/users/Aleks23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aleks23/subscriptions","organizations_url":"https://api.github.com/users/Aleks23/orgs","repos_url":"https://api.github.com/users/Aleks23/repos","events_url":"https://api.github.com/users/Aleks23/events{/privacy}","received_events_url":"https://api.github.com/users/Aleks23/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Aleks23/events","description":"","fork":true,"url":"https://api.github.com/repos/Aleks23/events","forks_url":"https://api.github.com/repos/Aleks23/events/forks","keys_url":"https://api.github.com/repos/Aleks23/events/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Aleks23/events/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Aleks23/events/teams","hooks_url":"https://api.github.com/repos/Aleks23/events/hooks","issue_events_url":"https://api.github.com/repos/Aleks23/events/issues/events{/number}","events_url":"https://api.github.com/repos/Aleks23/events/events","assignees_url":"https://api.github.com/repos/Aleks23/events/assignees{/user}","branches_url":"https://api.github.com/repos/Aleks23/events/branches{/branch}","tags_url":"https://api.github.com/repos/Aleks23/events/tags","blobs_url":"https://api.github.com/repos/Aleks23/events/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Aleks23/events/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Aleks23/events/git/refs{/sha}","trees_url":"https://api.github.com/repos/Aleks23/events/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Aleks23/events/statuses/{sha}","languages_url":"https://api.github.com/repos/Aleks23/events/languages","stargazers_url":"https://api.github.com/repos/Aleks23/events/stargazers","contributors_url":"https://api.github.com/repos/Aleks23/events/contributors","subscribers_url":"https://api.github.com/repos/Aleks23/events/subscribers","subscription_url":"https://api.github.com/repos/Aleks23/events/subscription","commits_url":"https://api.github.com/repos/Aleks23/events/commits{/sha}","git_commits_url":"https://api.github.com/repos/Aleks23/events/git/commits{/sha}","comments_url":"https://api.github.com/repos/Aleks23/events/comments{/number}","issue_comment_url":"https://api.github.com/repos/Aleks23/events/issues/comments{/number}","contents_url":"https://api.github.com/repos/Aleks23/events/contents/{+path}","compare_url":"https://api.github.com/repos/Aleks23/events/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Aleks23/events/merges","archive_url":"https://api.github.com/repos/Aleks23/events/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Aleks23/events/downloads","issues_url":"https://api.github.com/repos/Aleks23/events/issues{/number}","pulls_url":"https://api.github.com/repos/Aleks23/events/pulls{/number}","milestones_url":"https://api.github.com/repos/Aleks23/events/milestones{/number}","notifications_url":"https://api.github.com/repos/Aleks23/events/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Aleks23/events/labels{/name}","releases_url":"https://api.github.com/repos/Aleks23/events/releases{/id}","created_at":"2015-03-29T09:12:20Z","updated_at":"2015-04-04T09:39:08Z","pushed_at":"2015-04-04T11:36:39Z","git_url":"git://github.com/Aleks23/events.git","ssh_url":"git@github.com:Aleks23/events.git","clone_url":"https://github.com/Aleks23/events.git","svn_url":"https://github.com/Aleks23/events","homepage":"http://events.rosedu.org","size":1714,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"rosedu:39-model-database","ref":"39-model-database","sha":"bb32eb9c3fbeb19fad599164a8240fd5445c855c","user":{"login":"rosedu","id":1232963,"avatar_url":"https://avatars.githubusercontent.com/u/1232963?v=3","gravatar_id":"","url":"https://api.github.com/users/rosedu","html_url":"https://github.com/rosedu","followers_url":"https://api.github.com/users/rosedu/followers","following_url":"https://api.github.com/users/rosedu/following{/other_user}","gists_url":"https://api.github.com/users/rosedu/gists{/gist_id}","starred_url":"https://api.github.com/users/rosedu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosedu/subscriptions","organizations_url":"https://api.github.com/users/rosedu/orgs","repos_url":"https://api.github.com/users/rosedu/repos","events_url":"https://api.github.com/users/rosedu/events{/privacy}","received_events_url":"https://api.github.com/users/rosedu/received_events","type":"Organization","site_admin":false},"repo":{"id":27079833,"name":"events","full_name":"rosedu/events","owner":{"login":"rosedu","id":1232963,"avatar_url":"https://avatars.githubusercontent.com/u/1232963?v=3","gravatar_id":"","url":"https://api.github.com/users/rosedu","html_url":"https://github.com/rosedu","followers_url":"https://api.github.com/users/rosedu/followers","following_url":"https://api.github.com/users/rosedu/following{/other_user}","gists_url":"https://api.github.com/users/rosedu/gists{/gist_id}","starred_url":"https://api.github.com/users/rosedu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosedu/subscriptions","organizations_url":"https://api.github.com/users/rosedu/orgs","repos_url":"https://api.github.com/users/rosedu/repos","events_url":"https://api.github.com/users/rosedu/events{/privacy}","received_events_url":"https://api.github.com/users/rosedu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rosedu/events","description":"","fork":false,"url":"https://api.github.com/repos/rosedu/events","forks_url":"https://api.github.com/repos/rosedu/events/forks","keys_url":"https://api.github.com/repos/rosedu/events/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rosedu/events/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rosedu/events/teams","hooks_url":"https://api.github.com/repos/rosedu/events/hooks","issue_events_url":"https://api.github.com/repos/rosedu/events/issues/events{/number}","events_url":"https://api.github.com/repos/rosedu/events/events","assignees_url":"https://api.github.com/repos/rosedu/events/assignees{/user}","branches_url":"https://api.github.com/repos/rosedu/events/branches{/branch}","tags_url":"https://api.github.com/repos/rosedu/events/tags","blobs_url":"https://api.github.com/repos/rosedu/events/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rosedu/events/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rosedu/events/git/refs{/sha}","trees_url":"https://api.github.com/repos/rosedu/events/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rosedu/events/statuses/{sha}","languages_url":"https://api.github.com/repos/rosedu/events/languages","stargazers_url":"https://api.github.com/repos/rosedu/events/stargazers","contributors_url":"https://api.github.com/repos/rosedu/events/contributors","subscribers_url":"https://api.github.com/repos/rosedu/events/subscribers","subscription_url":"https://api.github.com/repos/rosedu/events/subscription","commits_url":"https://api.github.com/repos/rosedu/events/commits{/sha}","git_commits_url":"https://api.github.com/repos/rosedu/events/git/commits{/sha}","comments_url":"https://api.github.com/repos/rosedu/events/comments{/number}","issue_comment_url":"https://api.github.com/repos/rosedu/events/issues/comments{/number}","contents_url":"https://api.github.com/repos/rosedu/events/contents/{+path}","compare_url":"https://api.github.com/repos/rosedu/events/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rosedu/events/merges","archive_url":"https://api.github.com/repos/rosedu/events/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rosedu/events/downloads","issues_url":"https://api.github.com/repos/rosedu/events/issues{/number}","pulls_url":"https://api.github.com/repos/rosedu/events/pulls{/number}","milestones_url":"https://api.github.com/repos/rosedu/events/milestones{/number}","notifications_url":"https://api.github.com/repos/rosedu/events/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rosedu/events/labels{/name}","releases_url":"https://api.github.com/repos/rosedu/events/releases{/id}","created_at":"2014-11-24T14:46:13Z","updated_at":"2015-03-30T13:04:19Z","pushed_at":"2015-04-04T11:39:19Z","git_url":"git://github.com/rosedu/events.git","ssh_url":"git@github.com:rosedu/events.git","clone_url":"https://github.com/rosedu/events.git","svn_url":"https://github.com/rosedu/events","homepage":"http://events.rosedu.org","size":2140,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":17,"forks":3,"open_issues":17,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rosedu/events/pulls/44"},"html":{"href":"https://github.com/rosedu/events/pull/44"},"issue":{"href":"https://api.github.com/repos/rosedu/events/issues/44"},"comments":{"href":"https://api.github.com/repos/rosedu/events/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/rosedu/events/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/rosedu/events/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rosedu/events/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/rosedu/events/statuses/ea4afb7650025e945e91663600a4b2fb03e8a581"}}}}