{"action":"created","comment":{"url":"https://api.github.com/repos/opf/openproject/pulls/comments/35309918","id":35309918,"diff_hunk":"@@ -0,0 +1,54 @@\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+##\n+# Adds the scm_type column to the repositories table and updates all previous\n+# repository to correspond to these types.\n+#\n+# As until now, OP only supported local Git repositories and local or remote Subversion","path":"db/migrate/20150629075221_add_scm_type_to_repositories.rb","position":33,"original_position":33,"commit_id":"9336cff8bbc2d88fd552058bbc5d7076f1fccd47","original_commit_id":"bd2cb70980927c065a77fbc618b8398006344ec6","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":"@oliverguenther why do you differentiate between 'local' and 'existing'. I have scanned the code but couldn't find the explanation. Can you enlighten me?","created_at":"2015-07-23T10:50:11Z","updated_at":"2015-07-23T10:50:11Z","html_url":"https://github.com/opf/openproject/pull/3196#discussion_r35309918","pull_request_url":"https://api.github.com/repos/opf/openproject/pulls/3196","_links":{"self":{"href":"https://api.github.com/repos/opf/openproject/pulls/comments/35309918"},"html":{"href":"https://github.com/opf/openproject/pull/3196#discussion_r35309918"},"pull_request":{"href":"https://api.github.com/repos/opf/openproject/pulls/3196"}}},"pull_request":{"url":"https://api.github.com/repos/opf/openproject/pulls/3196","id":38787540,"html_url":"https://github.com/opf/openproject/pull/3196","diff_url":"https://github.com/opf/openproject/pull/3196.diff","patch_url":"https://github.com/opf/openproject/pull/3196.patch","issue_url":"https://api.github.com/repos/opf/openproject/issues/3196","number":3196,"state":"open","locked":false,"title":"Repository Management","user":{"login":"oliverguenther","id":459462,"avatar_url":"https://avatars.githubusercontent.com/u/459462?v=3","gravatar_id":"","url":"https://api.github.com/users/oliverguenther","html_url":"https://github.com/oliverguenther","followers_url":"https://api.github.com/users/oliverguenther/followers","following_url":"https://api.github.com/users/oliverguenther/following{/other_user}","gists_url":"https://api.github.com/users/oliverguenther/gists{/gist_id}","starred_url":"https://api.github.com/users/oliverguenther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliverguenther/subscriptions","organizations_url":"https://api.github.com/users/oliverguenther/orgs","repos_url":"https://api.github.com/users/oliverguenther/repos","events_url":"https://api.github.com/users/oliverguenther/events{/privacy}","received_events_url":"https://api.github.com/users/oliverguenther/received_events","type":"User","site_admin":false},"body":"This PR begins the push towards management of repository lifetime\r\nfrom within OpenProject.\r\n\r\nWhat this currently provides is the following:\r\n\r\n  - A mixin `ManageableRepository`, included by `Repository::{Git,\r\n      Subversion}` to provide an interface to repo management\r\n  - Two services and delayed_job workers for creating (`CreateManagedRepositoryService`) and\r\n  deleting (`DeleteRepositoryService`)\r\n  - Customized rendering of subforms in the repository settings for\r\n  arbitrary SCM vendors.\r\n\r\n  - [x] Provide sane ground to work on ( cf. state of [now closed] PR #3149 )\r\n  - [x] Rework SCM settings form (`{scm}_tags` is currently HTML generated\r\n        from within a Helper.)\r\n  - [x] Ease integration of arbitrary SCM vendors\r\n  - [x] Display meaningful error / warning when user looks at bare\r\n  repository (currently outputs 500, as Git HEAD / svn revision is not\r\n          available)\r\n  - [x] I18n\r\n  - [x] Specs\r\n    - [x] Fix legacy specs\r\n  - [X] Decide what to do with `Filesystem` adapter ~~[Will be removed in subsequent PR](https://github.com/oliverguenther/openproject/compare/feature/remove_filesystem_adapter...oliverguenther:feature/repository_management)~~ Merged into this PR due to the errors that would occur when using existing Filesystem repositories on these features.\r\n\r\n### Review remarks\r\n\r\n- Manged repositories are not enabled by default. The following section in configuration.yml currently controls the management.\r\n``` yaml\r\n  scm:\r\n    Git:\r\n      # Use command below to override the default git command taken from path.\r\n      # client_command: /usr/local/bin/git\r\n      manages: /tmp/git\r\n    Subversion:\r\n      manages: /tmp/svn\r\n      # Use command below to override the default svn command taken from path.\r\n      # client_command: /usr/local/bin/svn\r\n```\r\n- Creation / Deletion of managed repositories is asynchronous. Don't forget to start a delayed_job worker.\r\n- Rubocop complains about several complexity issues in the (git) adapter. I deem this refactoring to be necessary, but out of scope for this PR. I suggest we instead move to Libgit2/rugged for reading a Git repository instead, which [would also solve remote repository retrieval](https://community.openproject.org/work_packages/20422)\r\n- Hound still has some remaining remarks on other files which are either outdated or which I didn't really touch during this PR.\r\n- Use the following bookmarklet to toggle outdated hounds:\r\n```\r\njavascript:(function()%7B%24('.outdated-diff-comment-container').has('img%5Balt%3D\"%40houndci\"%5D').toggle()%7D)()\r\n```\r\n### Open Questions:\r\n\r\n  - **Configuration**: Currently replaces the existing options in\r\n  `configuration.yml`.\r\n  - **Implementation specifics**:\r\n    - Sub-projects repositories reside in a hierarchy below their parents\r\n    - How should the delayed_job react upon failure? (esp. creation of\r\n            repositories)\r\n\r\nRelevant work package: https://community.openproject.org/work_packages/20416","created_at":"2015-06-29T15:46:05Z","updated_at":"2015-07-23T10:50:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8ecf4a42e14febc7a646c8dda03224b9bea52d1","assignee":{"login":"oliverguenther","id":459462,"avatar_url":"https://avatars.githubusercontent.com/u/459462?v=3","gravatar_id":"","url":"https://api.github.com/users/oliverguenther","html_url":"https://github.com/oliverguenther","followers_url":"https://api.github.com/users/oliverguenther/followers","following_url":"https://api.github.com/users/oliverguenther/following{/other_user}","gists_url":"https://api.github.com/users/oliverguenther/gists{/gist_id}","starred_url":"https://api.github.com/users/oliverguenther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliverguenther/subscriptions","organizations_url":"https://api.github.com/users/oliverguenther/orgs","repos_url":"https://api.github.com/users/oliverguenther/repos","events_url":"https://api.github.com/users/oliverguenther/events{/privacy}","received_events_url":"https://api.github.com/users/oliverguenther/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/opf/openproject/milestones/3","html_url":"https://github.com/opf/openproject/milestones/4.3","labels_url":"https://api.github.com/repos/opf/openproject/milestones/3/labels","id":1104474,"number":3,"title":"4.3","description":"","creator":{"login":"myabc","id":755,"avatar_url":"https://avatars.githubusercontent.com/u/755?v=3","gravatar_id":"","url":"https://api.github.com/users/myabc","html_url":"https://github.com/myabc","followers_url":"https://api.github.com/users/myabc/followers","following_url":"https://api.github.com/users/myabc/following{/other_user}","gists_url":"https://api.github.com/users/myabc/gists{/gist_id}","starred_url":"https://api.github.com/users/myabc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myabc/subscriptions","organizations_url":"https://api.github.com/users/myabc/orgs","repos_url":"https://api.github.com/users/myabc/repos","events_url":"https://api.github.com/users/myabc/events{/privacy}","received_events_url":"https://api.github.com/users/myabc/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":7,"state":"open","created_at":"2015-05-11T10:04:28Z","updated_at":"2015-07-22T15:24:28Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/opf/openproject/pulls/3196/commits","review_comments_url":"https://api.github.com/repos/opf/openproject/pulls/3196/comments","review_comment_url":"https://api.github.com/repos/opf/openproject/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opf/openproject/issues/3196/comments","statuses_url":"https://api.github.com/repos/opf/openproject/statuses/9336cff8bbc2d88fd552058bbc5d7076f1fccd47","head":{"label":"oliverguenther:feature/repository_management","ref":"feature/repository_management","sha":"9336cff8bbc2d88fd552058bbc5d7076f1fccd47","user":{"login":"oliverguenther","id":459462,"avatar_url":"https://avatars.githubusercontent.com/u/459462?v=3","gravatar_id":"","url":"https://api.github.com/users/oliverguenther","html_url":"https://github.com/oliverguenther","followers_url":"https://api.github.com/users/oliverguenther/followers","following_url":"https://api.github.com/users/oliverguenther/following{/other_user}","gists_url":"https://api.github.com/users/oliverguenther/gists{/gist_id}","starred_url":"https://api.github.com/users/oliverguenther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliverguenther/subscriptions","organizations_url":"https://api.github.com/users/oliverguenther/orgs","repos_url":"https://api.github.com/users/oliverguenther/repos","events_url":"https://api.github.com/users/oliverguenther/events{/privacy}","received_events_url":"https://api.github.com/users/oliverguenther/received_events","type":"User","site_admin":false},"repo":{"id":33988921,"name":"openproject","full_name":"oliverguenther/openproject","owner":{"login":"oliverguenther","id":459462,"avatar_url":"https://avatars.githubusercontent.com/u/459462?v=3","gravatar_id":"","url":"https://api.github.com/users/oliverguenther","html_url":"https://github.com/oliverguenther","followers_url":"https://api.github.com/users/oliverguenther/followers","following_url":"https://api.github.com/users/oliverguenther/following{/other_user}","gists_url":"https://api.github.com/users/oliverguenther/gists{/gist_id}","starred_url":"https://api.github.com/users/oliverguenther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliverguenther/subscriptions","organizations_url":"https://api.github.com/users/oliverguenther/orgs","repos_url":"https://api.github.com/users/oliverguenther/repos","events_url":"https://api.github.com/users/oliverguenther/events{/privacy}","received_events_url":"https://api.github.com/users/oliverguenther/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oliverguenther/openproject","description":"OpenProject is a web-based project management system built on Ruby on Rails","fork":true,"url":"https://api.github.com/repos/oliverguenther/openproject","forks_url":"https://api.github.com/repos/oliverguenther/openproject/forks","keys_url":"https://api.github.com/repos/oliverguenther/openproject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oliverguenther/openproject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oliverguenther/openproject/teams","hooks_url":"https://api.github.com/repos/oliverguenther/openproject/hooks","issue_events_url":"https://api.github.com/repos/oliverguenther/openproject/issues/events{/number}","events_url":"https://api.github.com/repos/oliverguenther/openproject/events","assignees_url":"https://api.github.com/repos/oliverguenther/openproject/assignees{/user}","branches_url":"https://api.github.com/repos/oliverguenther/openproject/branches{/branch}","tags_url":"https://api.github.com/repos/oliverguenther/openproject/tags","blobs_url":"https://api.github.com/repos/oliverguenther/openproject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oliverguenther/openproject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oliverguenther/openproject/git/refs{/sha}","trees_url":"https://api.github.com/repos/oliverguenther/openproject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oliverguenther/openproject/statuses/{sha}","languages_url":"https://api.github.com/repos/oliverguenther/openproject/languages","stargazers_url":"https://api.github.com/repos/oliverguenther/openproject/stargazers","contributors_url":"https://api.github.com/repos/oliverguenther/openproject/contributors","subscribers_url":"https://api.github.com/repos/oliverguenther/openproject/subscribers","subscription_url":"https://api.github.com/repos/oliverguenther/openproject/subscription","commits_url":"https://api.github.com/repos/oliverguenther/openproject/commits{/sha}","git_commits_url":"https://api.github.com/repos/oliverguenther/openproject/git/commits{/sha}","comments_url":"https://api.github.com/repos/oliverguenther/openproject/comments{/number}","issue_comment_url":"https://api.github.com/repos/oliverguenther/openproject/issues/comments{/number}","contents_url":"https://api.github.com/repos/oliverguenther/openproject/contents/{+path}","compare_url":"https://api.github.com/repos/oliverguenther/openproject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oliverguenther/openproject/merges","archive_url":"https://api.github.com/repos/oliverguenther/openproject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oliverguenther/openproject/downloads","issues_url":"https://api.github.com/repos/oliverguenther/openproject/issues{/number}","pulls_url":"https://api.github.com/repos/oliverguenther/openproject/pulls{/number}","milestones_url":"https://api.github.com/repos/oliverguenther/openproject/milestones{/number}","notifications_url":"https://api.github.com/repos/oliverguenther/openproject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oliverguenther/openproject/labels{/name}","releases_url":"https://api.github.com/repos/oliverguenther/openproject/releases{/id}","created_at":"2015-04-15T11:02:49Z","updated_at":"2015-04-15T11:02:57Z","pushed_at":"2015-07-23T09:48:30Z","git_url":"git://github.com/oliverguenther/openproject.git","ssh_url":"git@github.com:oliverguenther/openproject.git","clone_url":"https://github.com/oliverguenther/openproject.git","svn_url":"https://github.com/oliverguenther/openproject","homepage":"https://www.openproject.org","size":65875,"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.3","ref":"release/4.3","sha":"d6f778d805f7696d1ced6e0a036fb442341bcfff","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-23T05:33:56Z","pushed_at":"2015-07-23T10:03:49Z","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":204486,"stargazers_count":684,"watchers_count":684,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":291,"mirror_url":null,"open_issues_count":32,"forks":291,"open_issues":32,"watchers":684,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/opf/openproject/pulls/3196"},"html":{"href":"https://github.com/opf/openproject/pull/3196"},"issue":{"href":"https://api.github.com/repos/opf/openproject/issues/3196"},"comments":{"href":"https://api.github.com/repos/opf/openproject/issues/3196/comments"},"review_comments":{"href":"https://api.github.com/repos/opf/openproject/pulls/3196/comments"},"review_comment":{"href":"https://api.github.com/repos/opf/openproject/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opf/openproject/pulls/3196/commits"},"statuses":{"href":"https://api.github.com/repos/opf/openproject/statuses/9336cff8bbc2d88fd552058bbc5d7076f1fccd47"}}}}