{"action":"created","comment":{"url":"https://api.github.com/repos/opf/openproject/pulls/comments/35549164","id":35549164,"diff_hunk":"@@ -0,0 +1,128 @@\n+#-- encoding: UTF-8\n+#-- copyright\n+# OpenProject is a project management system.\n+# Copyright (C) 2012-2015 the OpenProject Foundation (OPF)\n+#\n+# This program is free software; you can redistribute it and/or\n+# modify it under the terms of the GNU General Public License version 3.\n+#\n+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:\n+# Copyright (C) 2006-2013 Jean-Philippe Lang\n+# Copyright (C) 2010-2013 the ChiliProject Team\n+#\n+# This program is free software; you can redistribute it and/or\n+# modify it under the terms of the GNU General Public License\n+# as published by the Free Software Foundation; either version 2\n+# of the License, or (at your option) any later version.\n+#\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, write to the Free Software\n+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n+#\n+# See doc/COPYRIGHT.rdoc for more details.\n+#++\n+\n+if Role.where(builtin: false).any?\n+  puts '***** Skipping roles as there are already some configured'\n+else\n+  Role.transaction do\n+    Role.new.tap do |role|\n+      role.name = I18n.t(:default_role_project_admin)\n+      role.position = 3\n+      role.permissions = Role.new.setable_permissions.map(&:name)\n+    end.save!\n+\n+    Role.new.tap do |role|\n+      role.name = I18n.t(:default_role_member)\n+      role.position = 4\n+      role.permissions = [:view_work_packages,\n+                          :export_work_packages,\n+                          :add_work_packages,\n+                          :move_work_packages,\n+                          :edit_work_packages,\n+                          :add_work_package_notes,\n+                          :edit_own_work_package_notes,\n+                          :manage_work_package_relations,\n+                          :manage_subtasks,\n+                          :manage_public_queries,\n+                          :save_queries,\n+                          :view_work_package_watchers,\n+                          :add_work_package_watchers,\n+                          :delete_work_package_watchers,\n+                          :view_calendar,\n+                          :comment_news,\n+                          :log_time,\n+                          :view_time_entries,\n+                          :edit_own_time_entries,\n+                          :view_project_associations,\n+                          :view_timelines,\n+                          :edit_timelines,\n+                          :delete_timelines,\n+                          :view_reportings,\n+                          :edit_reportings,\n+                          :delete_reportings,\n+                          :manage_wiki,\n+                          :manage_wiki_menu,\n+                          :rename_wiki_pages,\n+                          :change_wiki_parent_page,\n+                          :delete_wiki_pages,\n+                          :view_wiki_pages,\n+                          :export_wiki_pages,\n+                          :view_wiki_edits,\n+                          :edit_wiki_pages,\n+                          :delete_wiki_pages_attachments,\n+                          :protect_wiki_pages,\n+                          :list_attachments,\n+                          :add_messages,\n+                          :edit_own_messages,\n+                          :delete_own_messages,\n+                          :browse_repository,\n+                          :view_changesets,\n+                          :commit_access,\n+                          :view_commit_author_statistics]\n+    end.save!\n+\n+    Role.new.tap do |reader|\n+      reader.name = I18n.t(:default_role_reader)\n+      reader.position =  5","path":"db/seeds/roles.rb","position":92,"original_position":92,"commit_id":"d335cfddd2de8c57db16f6bd4e14d8c887853c19","original_commit_id":"d335cfddd2de8c57db16f6bd4e14d8c887853c19","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":"Unnecessary spacing detected.","created_at":"2015-07-27T15:30:12Z","updated_at":"2015-07-27T15:30:12Z","html_url":"https://github.com/opf/openproject/pull/3280#discussion_r35549164","pull_request_url":"https://api.github.com/repos/opf/openproject/pulls/3280","_links":{"self":{"href":"https://api.github.com/repos/opf/openproject/pulls/comments/35549164"},"html":{"href":"https://github.com/opf/openproject/pull/3280#discussion_r35549164"},"pull_request":{"href":"https://api.github.com/repos/opf/openproject/pulls/3280"}}},"pull_request":{"url":"https://api.github.com/repos/opf/openproject/pulls/3280","id":40915800,"html_url":"https://github.com/opf/openproject/pull/3280","diff_url":"https://github.com/opf/openproject/pull/3280.diff","patch_url":"https://github.com/opf/openproject/pull/3280.patch","issue_url":"https://api.github.com/repos/opf/openproject/issues/3280","number":3280,"state":"open","locked":false,"title":"Feature/new default data","user":{"login":"ulferts","id":617519,"avatar_url":"https://avatars.githubusercontent.com/u/617519?v=3","gravatar_id":"","url":"https://api.github.com/users/ulferts","html_url":"https://github.com/ulferts","followers_url":"https://api.github.com/users/ulferts/followers","following_url":"https://api.github.com/users/ulferts/following{/other_user}","gists_url":"https://api.github.com/users/ulferts/gists{/gist_id}","starred_url":"https://api.github.com/users/ulferts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulferts/subscriptions","organizations_url":"https://api.github.com/users/ulferts/orgs","repos_url":"https://api.github.com/users/ulferts/repos","events_url":"https://api.github.com/users/ulferts/events{/privacy}","received_events_url":"https://api.github.com/users/ulferts/received_events","type":"User","site_admin":false},"body":"Consists of two parts:\r\n\r\n1. Stripping the `DefaultData::Loader` of it's functionality and move everything into db/seed/...\r\n * The transparent creation of `PlanningElementTypeColors` has also been moved into the seeding\r\n2. Adapting the seeded data according to the change requirements.\r\n * The type `none` is no longer seeded unless explicitly required. This should only be the case for installations that have had the timelines plugin installed. There shouldn't be to many of those. I still believe that the none type could serve it's purpose of implementing the null object pattern but this would only be necessary if it should actually be desired for work packages to be able to have no type.\r\n\r\nTodo:\r\n- [x] Remove loader altogether\r\n- [x] Check with plugins\r\n - [x] Backlogs\r\n - [x] Multitenancy\r\n - ~~Meetings~~\r\n- [x] Double check data\r\n- [x] Check to see whether the documentation needs to be adapted\r\n\r\nhttps://community.openproject.org/work_packages/20853 ","created_at":"2015-07-27T15:29:57Z","updated_at":"2015-07-27T15:30:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0c45e07f4a5934e4825f0aa7302516153665b0e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opf/openproject/pulls/3280/commits","review_comments_url":"https://api.github.com/repos/opf/openproject/pulls/3280/comments","review_comment_url":"https://api.github.com/repos/opf/openproject/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opf/openproject/issues/3280/comments","statuses_url":"https://api.github.com/repos/opf/openproject/statuses/d335cfddd2de8c57db16f6bd4e14d8c887853c19","head":{"label":"ulferts:feature/new_default_data","ref":"feature/new_default_data","sha":"d335cfddd2de8c57db16f6bd4e14d8c887853c19","user":{"login":"ulferts","id":617519,"avatar_url":"https://avatars.githubusercontent.com/u/617519?v=3","gravatar_id":"","url":"https://api.github.com/users/ulferts","html_url":"https://github.com/ulferts","followers_url":"https://api.github.com/users/ulferts/followers","following_url":"https://api.github.com/users/ulferts/following{/other_user}","gists_url":"https://api.github.com/users/ulferts/gists{/gist_id}","starred_url":"https://api.github.com/users/ulferts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulferts/subscriptions","organizations_url":"https://api.github.com/users/ulferts/orgs","repos_url":"https://api.github.com/users/ulferts/repos","events_url":"https://api.github.com/users/ulferts/events{/privacy}","received_events_url":"https://api.github.com/users/ulferts/received_events","type":"User","site_admin":false},"repo":{"id":31550602,"name":"openproject","full_name":"ulferts/openproject","owner":{"login":"ulferts","id":617519,"avatar_url":"https://avatars.githubusercontent.com/u/617519?v=3","gravatar_id":"","url":"https://api.github.com/users/ulferts","html_url":"https://github.com/ulferts","followers_url":"https://api.github.com/users/ulferts/followers","following_url":"https://api.github.com/users/ulferts/following{/other_user}","gists_url":"https://api.github.com/users/ulferts/gists{/gist_id}","starred_url":"https://api.github.com/users/ulferts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulferts/subscriptions","organizations_url":"https://api.github.com/users/ulferts/orgs","repos_url":"https://api.github.com/users/ulferts/repos","events_url":"https://api.github.com/users/ulferts/events{/privacy}","received_events_url":"https://api.github.com/users/ulferts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ulferts/openproject","description":"OpenProject is a web-based project management system built on Ruby on Rails","fork":true,"url":"https://api.github.com/repos/ulferts/openproject","forks_url":"https://api.github.com/repos/ulferts/openproject/forks","keys_url":"https://api.github.com/repos/ulferts/openproject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ulferts/openproject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ulferts/openproject/teams","hooks_url":"https://api.github.com/repos/ulferts/openproject/hooks","issue_events_url":"https://api.github.com/repos/ulferts/openproject/issues/events{/number}","events_url":"https://api.github.com/repos/ulferts/openproject/events","assignees_url":"https://api.github.com/repos/ulferts/openproject/assignees{/user}","branches_url":"https://api.github.com/repos/ulferts/openproject/branches{/branch}","tags_url":"https://api.github.com/repos/ulferts/openproject/tags","blobs_url":"https://api.github.com/repos/ulferts/openproject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ulferts/openproject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ulferts/openproject/git/refs{/sha}","trees_url":"https://api.github.com/repos/ulferts/openproject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ulferts/openproject/statuses/{sha}","languages_url":"https://api.github.com/repos/ulferts/openproject/languages","stargazers_url":"https://api.github.com/repos/ulferts/openproject/stargazers","contributors_url":"https://api.github.com/repos/ulferts/openproject/contributors","subscribers_url":"https://api.github.com/repos/ulferts/openproject/subscribers","subscription_url":"https://api.github.com/repos/ulferts/openproject/subscription","commits_url":"https://api.github.com/repos/ulferts/openproject/commits{/sha}","git_commits_url":"https://api.github.com/repos/ulferts/openproject/git/commits{/sha}","comments_url":"https://api.github.com/repos/ulferts/openproject/comments{/number}","issue_comment_url":"https://api.github.com/repos/ulferts/openproject/issues/comments{/number}","contents_url":"https://api.github.com/repos/ulferts/openproject/contents/{+path}","compare_url":"https://api.github.com/repos/ulferts/openproject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ulferts/openproject/merges","archive_url":"https://api.github.com/repos/ulferts/openproject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ulferts/openproject/downloads","issues_url":"https://api.github.com/repos/ulferts/openproject/issues{/number}","pulls_url":"https://api.github.com/repos/ulferts/openproject/pulls{/number}","milestones_url":"https://api.github.com/repos/ulferts/openproject/milestones{/number}","notifications_url":"https://api.github.com/repos/ulferts/openproject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ulferts/openproject/labels{/name}","releases_url":"https://api.github.com/repos/ulferts/openproject/releases{/id}","created_at":"2015-03-02T16:41:36Z","updated_at":"2015-03-26T16:27:48Z","pushed_at":"2015-07-27T15:24:35Z","git_url":"git://github.com/ulferts/openproject.git","ssh_url":"git@github.com:ulferts/openproject.git","clone_url":"https://github.com/ulferts/openproject.git","svn_url":"https://github.com/ulferts/openproject","homepage":"https://www.openproject.org","size":66424,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"opf:release/4.2","ref":"release/4.2","sha":"42c1acc0940383dfbed8377c208c069d331dc91b","user":{"login":"opf","id":1756674,"avatar_url":"https://avatars.githubusercontent.com/u/1756674?v=3","gravatar_id":"","url":"https://api.github.com/users/opf","html_url":"https://github.com/opf","followers_url":"https://api.github.com/users/opf/followers","following_url":"https://api.github.com/users/opf/following{/other_user}","gists_url":"https://api.github.com/users/opf/gists{/gist_id}","starred_url":"https://api.github.com/users/opf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opf/subscriptions","organizations_url":"https://api.github.com/users/opf/orgs","repos_url":"https://api.github.com/users/opf/repos","events_url":"https://api.github.com/users/opf/events{/privacy}","received_events_url":"https://api.github.com/users/opf/received_events","type":"Organization","site_admin":false},"repo":{"id":6899875,"name":"openproject","full_name":"opf/openproject","owner":{"login":"opf","id":1756674,"avatar_url":"https://avatars.githubusercontent.com/u/1756674?v=3","gravatar_id":"","url":"https://api.github.com/users/opf","html_url":"https://github.com/opf","followers_url":"https://api.github.com/users/opf/followers","following_url":"https://api.github.com/users/opf/following{/other_user}","gists_url":"https://api.github.com/users/opf/gists{/gist_id}","starred_url":"https://api.github.com/users/opf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opf/subscriptions","organizations_url":"https://api.github.com/users/opf/orgs","repos_url":"https://api.github.com/users/opf/repos","events_url":"https://api.github.com/users/opf/events{/privacy}","received_events_url":"https://api.github.com/users/opf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opf/openproject","description":"OpenProject is a web-based project management system built on Ruby on Rails","fork":false,"url":"https://api.github.com/repos/opf/openproject","forks_url":"https://api.github.com/repos/opf/openproject/forks","keys_url":"https://api.github.com/repos/opf/openproject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opf/openproject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opf/openproject/teams","hooks_url":"https://api.github.com/repos/opf/openproject/hooks","issue_events_url":"https://api.github.com/repos/opf/openproject/issues/events{/number}","events_url":"https://api.github.com/repos/opf/openproject/events","assignees_url":"https://api.github.com/repos/opf/openproject/assignees{/user}","branches_url":"https://api.github.com/repos/opf/openproject/branches{/branch}","tags_url":"https://api.github.com/repos/opf/openproject/tags","blobs_url":"https://api.github.com/repos/opf/openproject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opf/openproject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opf/openproject/git/refs{/sha}","trees_url":"https://api.github.com/repos/opf/openproject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opf/openproject/statuses/{sha}","languages_url":"https://api.github.com/repos/opf/openproject/languages","stargazers_url":"https://api.github.com/repos/opf/openproject/stargazers","contributors_url":"https://api.github.com/repos/opf/openproject/contributors","subscribers_url":"https://api.github.com/repos/opf/openproject/subscribers","subscription_url":"https://api.github.com/repos/opf/openproject/subscription","commits_url":"https://api.github.com/repos/opf/openproject/commits{/sha}","git_commits_url":"https://api.github.com/repos/opf/openproject/git/commits{/sha}","comments_url":"https://api.github.com/repos/opf/openproject/comments{/number}","issue_comment_url":"https://api.github.com/repos/opf/openproject/issues/comments{/number}","contents_url":"https://api.github.com/repos/opf/openproject/contents/{+path}","compare_url":"https://api.github.com/repos/opf/openproject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opf/openproject/merges","archive_url":"https://api.github.com/repos/opf/openproject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opf/openproject/downloads","issues_url":"https://api.github.com/repos/opf/openproject/issues{/number}","pulls_url":"https://api.github.com/repos/opf/openproject/pulls{/number}","milestones_url":"https://api.github.com/repos/opf/openproject/milestones{/number}","notifications_url":"https://api.github.com/repos/opf/openproject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opf/openproject/labels{/name}","releases_url":"https://api.github.com/repos/opf/openproject/releases{/id}","created_at":"2012-11-28T09:59:11Z","updated_at":"2015-07-27T12:21:00Z","pushed_at":"2015-07-27T15:29:57Z","git_url":"git://github.com/opf/openproject.git","ssh_url":"git@github.com:opf/openproject.git","clone_url":"https://github.com/opf/openproject.git","svn_url":"https://github.com/opf/openproject","homepage":"https://www.openproject.org","size":205524,"stargazers_count":689,"watchers_count":689,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":290,"mirror_url":null,"open_issues_count":26,"forks":290,"open_issues":26,"watchers":689,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/opf/openproject/pulls/3280"},"html":{"href":"https://github.com/opf/openproject/pull/3280"},"issue":{"href":"https://api.github.com/repos/opf/openproject/issues/3280"},"comments":{"href":"https://api.github.com/repos/opf/openproject/issues/3280/comments"},"review_comments":{"href":"https://api.github.com/repos/opf/openproject/pulls/3280/comments"},"review_comment":{"href":"https://api.github.com/repos/opf/openproject/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opf/openproject/pulls/3280/commits"},"statuses":{"href":"https://api.github.com/repos/opf/openproject/statuses/d335cfddd2de8c57db16f6bd4e14d8c887853c19"}}}}