{"action":"created","comment":{"url":"https://api.github.com/repos/opf/openproject/pulls/comments/32194446","id":32194446,"diff_hunk":"@@ -0,0 +1,67 @@\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+module API\n+  module V3\n+    module WorkPackages\n+      class UpdateFormRepresenter < FormRepresenter\n+        link :self do\n+          {\n+            href: api_v3_paths.work_package_form(represented.id),\n+            method: :post\n+          }\n+        end\n+\n+        link :validate do\n+          {\n+            href: api_v3_paths.work_package_form(represented.id),\n+            method: :post\n+          }\n+        end\n+\n+        link :previewMarkup do\n+          {\n+            href: api_v3_paths.render_markup(link: api_v3_paths.work_package(represented.id)),\n+            method: :post\n+          }\n+        end\n+\n+        link :commit do\n+          {\n+            href: api_v3_paths.work_package(represented.id),\n+            method: :patch\n+          } if current_user.allowed_to?(:edit_work_packages, represented.project) &&","path":"lib/api/v3/work_packages/update_form_representer.rb","position":59,"original_position":59,"commit_id":"526b2ee8a1f1d3cd002a238bab003ee0149e86c7","original_commit_id":"526b2ee8a1f1d3cd002a238bab003ee0149e86c7","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":"Line is too long. [84/80]","created_at":"2015-06-11T07:06:29Z","updated_at":"2015-06-11T07:06:29Z","html_url":"https://github.com/opf/openproject/pull/2990#discussion_r32194446","pull_request_url":"https://api.github.com/repos/opf/openproject/pulls/2990","_links":{"self":{"href":"https://api.github.com/repos/opf/openproject/pulls/comments/32194446"},"html":{"href":"https://github.com/opf/openproject/pull/2990#discussion_r32194446"},"pull_request":{"href":"https://api.github.com/repos/opf/openproject/pulls/2990"}}},"pull_request":{"url":"https://api.github.com/repos/opf/openproject/pulls/2990","id":35238277,"html_url":"https://github.com/opf/openproject/pull/2990","diff_url":"https://github.com/opf/openproject/pull/2990.diff","patch_url":"https://github.com/opf/openproject/pull/2990.patch","issue_url":"https://api.github.com/repos/opf/openproject/issues/2990","number":2990,"state":"open","locked":false,"title":"Add create work package endpoints","user":{"login":"Azure7111","id":1461183,"avatar_url":"https://avatars.githubusercontent.com/u/1461183?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure7111","html_url":"https://github.com/Azure7111","followers_url":"https://api.github.com/users/Azure7111/followers","following_url":"https://api.github.com/users/Azure7111/following{/other_user}","gists_url":"https://api.github.com/users/Azure7111/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure7111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure7111/subscriptions","organizations_url":"https://api.github.com/users/Azure7111/orgs","repos_url":"https://api.github.com/users/Azure7111/repos","events_url":"https://api.github.com/users/Azure7111/events{/privacy}","received_events_url":"https://api.github.com/users/Azure7111/received_events","type":"User","site_admin":false},"body":"This PR aims to implement endpoints to create new work packages via APIv3 as [specified](http://opf.github.io/apiv3-doc/#projects-workpackages).\r\n\r\nhttps://community.openproject.org/work_packages/19987\r\n\r\nPlease have a close look at the form response as I can only hope not to have forgotten to adjust something.\r\n\r\n:warning: Please note that this branch has to be merged into the release/4.2 branch as well","created_at":"2015-05-12T15:25:51Z","updated_at":"2015-06-11T07:06:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"636855e9ba14e1af15a9817a5292f50f8aa08afc","assignee":{"login":"Azure7111","id":1461183,"avatar_url":"https://avatars.githubusercontent.com/u/1461183?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure7111","html_url":"https://github.com/Azure7111","followers_url":"https://api.github.com/users/Azure7111/followers","following_url":"https://api.github.com/users/Azure7111/following{/other_user}","gists_url":"https://api.github.com/users/Azure7111/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure7111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure7111/subscriptions","organizations_url":"https://api.github.com/users/Azure7111/orgs","repos_url":"https://api.github.com/users/Azure7111/repos","events_url":"https://api.github.com/users/Azure7111/events{/privacy}","received_events_url":"https://api.github.com/users/Azure7111/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/opf/openproject/milestones/2","html_url":"https://github.com/opf/openproject/milestones/4.2","labels_url":"https://api.github.com/repos/opf/openproject/milestones/2/labels","id":1063127,"number":2,"title":"4.2","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":10,"closed_issues":6,"state":"open","created_at":"2015-04-11T14:25:34Z","updated_at":"2015-05-28T13:20:28Z","due_on":"2015-06-29T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/opf/openproject/pulls/2990/commits","review_comments_url":"https://api.github.com/repos/opf/openproject/pulls/2990/comments","review_comment_url":"https://api.github.com/repos/opf/openproject/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opf/openproject/issues/2990/comments","statuses_url":"https://api.github.com/repos/opf/openproject/statuses/526b2ee8a1f1d3cd002a238bab003ee0149e86c7","head":{"label":"Azure7111:feature/create_work_package","ref":"feature/create_work_package","sha":"526b2ee8a1f1d3cd002a238bab003ee0149e86c7","user":{"login":"Azure7111","id":1461183,"avatar_url":"https://avatars.githubusercontent.com/u/1461183?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure7111","html_url":"https://github.com/Azure7111","followers_url":"https://api.github.com/users/Azure7111/followers","following_url":"https://api.github.com/users/Azure7111/following{/other_user}","gists_url":"https://api.github.com/users/Azure7111/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure7111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure7111/subscriptions","organizations_url":"https://api.github.com/users/Azure7111/orgs","repos_url":"https://api.github.com/users/Azure7111/repos","events_url":"https://api.github.com/users/Azure7111/events{/privacy}","received_events_url":"https://api.github.com/users/Azure7111/received_events","type":"User","site_admin":false},"repo":{"id":32079075,"name":"openproject","full_name":"Azure7111/openproject","owner":{"login":"Azure7111","id":1461183,"avatar_url":"https://avatars.githubusercontent.com/u/1461183?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure7111","html_url":"https://github.com/Azure7111","followers_url":"https://api.github.com/users/Azure7111/followers","following_url":"https://api.github.com/users/Azure7111/following{/other_user}","gists_url":"https://api.github.com/users/Azure7111/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure7111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure7111/subscriptions","organizations_url":"https://api.github.com/users/Azure7111/orgs","repos_url":"https://api.github.com/users/Azure7111/repos","events_url":"https://api.github.com/users/Azure7111/events{/privacy}","received_events_url":"https://api.github.com/users/Azure7111/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Azure7111/openproject","description":"OpenProject is a web-based project management system built on Ruby on Rails","fork":true,"url":"https://api.github.com/repos/Azure7111/openproject","forks_url":"https://api.github.com/repos/Azure7111/openproject/forks","keys_url":"https://api.github.com/repos/Azure7111/openproject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure7111/openproject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure7111/openproject/teams","hooks_url":"https://api.github.com/repos/Azure7111/openproject/hooks","issue_events_url":"https://api.github.com/repos/Azure7111/openproject/issues/events{/number}","events_url":"https://api.github.com/repos/Azure7111/openproject/events","assignees_url":"https://api.github.com/repos/Azure7111/openproject/assignees{/user}","branches_url":"https://api.github.com/repos/Azure7111/openproject/branches{/branch}","tags_url":"https://api.github.com/repos/Azure7111/openproject/tags","blobs_url":"https://api.github.com/repos/Azure7111/openproject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure7111/openproject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure7111/openproject/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure7111/openproject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure7111/openproject/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure7111/openproject/languages","stargazers_url":"https://api.github.com/repos/Azure7111/openproject/stargazers","contributors_url":"https://api.github.com/repos/Azure7111/openproject/contributors","subscribers_url":"https://api.github.com/repos/Azure7111/openproject/subscribers","subscription_url":"https://api.github.com/repos/Azure7111/openproject/subscription","commits_url":"https://api.github.com/repos/Azure7111/openproject/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure7111/openproject/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure7111/openproject/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure7111/openproject/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure7111/openproject/contents/{+path}","compare_url":"https://api.github.com/repos/Azure7111/openproject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure7111/openproject/merges","archive_url":"https://api.github.com/repos/Azure7111/openproject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure7111/openproject/downloads","issues_url":"https://api.github.com/repos/Azure7111/openproject/issues{/number}","pulls_url":"https://api.github.com/repos/Azure7111/openproject/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure7111/openproject/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure7111/openproject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure7111/openproject/labels{/name}","releases_url":"https://api.github.com/repos/Azure7111/openproject/releases{/id}","created_at":"2015-03-12T13:42:37Z","updated_at":"2015-03-12T13:42:45Z","pushed_at":"2015-06-11T07:06:14Z","git_url":"git://github.com/Azure7111/openproject.git","ssh_url":"git@github.com:Azure7111/openproject.git","clone_url":"https://github.com/Azure7111/openproject.git","svn_url":"https://github.com/Azure7111/openproject","homepage":"https://www.openproject.org","size":65335,"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:dev","ref":"dev","sha":"f96b93b57f30a4e3972a2d581be8ace2b77c8f0a","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-06-10T17:06:31Z","pushed_at":"2015-06-11T07:06:22Z","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":197581,"stargazers_count":632,"watchers_count":632,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":272,"mirror_url":null,"open_issues_count":67,"forks":272,"open_issues":67,"watchers":632,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/opf/openproject/pulls/2990"},"html":{"href":"https://github.com/opf/openproject/pull/2990"},"issue":{"href":"https://api.github.com/repos/opf/openproject/issues/2990"},"comments":{"href":"https://api.github.com/repos/opf/openproject/issues/2990/comments"},"review_comments":{"href":"https://api.github.com/repos/opf/openproject/pulls/2990/comments"},"review_comment":{"href":"https://api.github.com/repos/opf/openproject/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opf/openproject/pulls/2990/commits"},"statuses":{"href":"https://api.github.com/repos/opf/openproject/statuses/526b2ee8a1f1d3cd002a238bab003ee0149e86c7"}}}}