{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/comments/32111393","id":32111393,"diff_hunk":"@@ -79,9 +79,10 @@ def destroy\n         process_response @config_template.destroy\n       end\n \n-      api :GET, \"/config_templates/build_pxe_default\", N_(\"Update the default PXE menu on all configured TFTP servers\")\n+      api :POST, \"/config_templates/build_pxe_default\", N_(\"Update the default PXE menu on all configured TFTP servers\")\n \n       def build_pxe_default\n+        ::ActiveSupport::Deprecation.warn('GET method for build pxe default is deprecated. Please use POST instead.') if request.method == \"GET\"","path":"app/controllers/api/v2/config_templates_controller.rb","position":8,"original_position":8,"commit_id":"557f97bbc4896ea7476abaf45c303c44e9fad4e0","original_commit_id":"557f97bbc4896ea7476abaf45c303c44e9fad4e0","user":{"login":"ShimShtein","id":10046168,"avatar_url":"https://avatars.githubusercontent.com/u/10046168?v=3","gravatar_id":"","url":"https://api.github.com/users/ShimShtein","html_url":"https://github.com/ShimShtein","followers_url":"https://api.github.com/users/ShimShtein/followers","following_url":"https://api.github.com/users/ShimShtein/following{/other_user}","gists_url":"https://api.github.com/users/ShimShtein/gists{/gist_id}","starred_url":"https://api.github.com/users/ShimShtein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShimShtein/subscriptions","organizations_url":"https://api.github.com/users/ShimShtein/orgs","repos_url":"https://api.github.com/users/ShimShtein/repos","events_url":"https://api.github.com/users/ShimShtein/events{/privacy}","received_events_url":"https://api.github.com/users/ShimShtein/received_events","type":"User","site_admin":false},"body":"I think it's not exactly what @domcleal  has meant, we should leave the GET variant, but before doing its work, it should log a deprecation warning.\r\nsomething like this:\r\n``` Ruby\r\napi :GET, \"/config_templates/build_pxe_default\", N_(\"Update the default PXE menu on all configured TFTP servers\")\r\ndef build_pxe_default_with_warning\r\n  Deprecation.warn('...')\r\n  build_pxe_default\r\nend\r\n\r\napi :POST, \"/config_templates/build_pxe_default\", N_(\"Update the default PXE menu on all configured TFTP servers\")\r\ndef build_pxe_default\r\n  do_work here\r\nend\r\n```","created_at":"2015-06-10T12:24:09Z","updated_at":"2015-06-10T12:24:09Z","html_url":"https://github.com/theforeman/foreman/pull/2446#discussion_r32111393","pull_request_url":"https://api.github.com/repos/theforeman/foreman/pulls/2446","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments/32111393"},"html":{"href":"https://github.com/theforeman/foreman/pull/2446#discussion_r32111393"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2446"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/2446","id":37251312,"html_url":"https://github.com/theforeman/foreman/pull/2446","diff_url":"https://github.com/theforeman/foreman/pull/2446.diff","patch_url":"https://github.com/theforeman/foreman/pull/2446.patch","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/2446","number":2446,"state":"open","locked":false,"title":"Fixes #6976 - Build default PXE menu should be POST request","user":{"login":"tstrachota","id":1186631,"avatar_url":"https://avatars.githubusercontent.com/u/1186631?v=3","gravatar_id":"","url":"https://api.github.com/users/tstrachota","html_url":"https://github.com/tstrachota","followers_url":"https://api.github.com/users/tstrachota/followers","following_url":"https://api.github.com/users/tstrachota/following{/other_user}","gists_url":"https://api.github.com/users/tstrachota/gists{/gist_id}","starred_url":"https://api.github.com/users/tstrachota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tstrachota/subscriptions","organizations_url":"https://api.github.com/users/tstrachota/orgs","repos_url":"https://api.github.com/users/tstrachota/repos","events_url":"https://api.github.com/users/tstrachota/events{/privacy}","received_events_url":"https://api.github.com/users/tstrachota/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-09T13:12:58Z","updated_at":"2015-06-10T12:24:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"98778daef25f03c48bd2aef4f4167ae244145137","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman/pulls/2446/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman/pulls/2446/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/2446/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/557f97bbc4896ea7476abaf45c303c44e9fad4e0","head":{"label":"tstrachota:build_pxe_6976","ref":"build_pxe_6976","sha":"557f97bbc4896ea7476abaf45c303c44e9fad4e0","user":{"login":"tstrachota","id":1186631,"avatar_url":"https://avatars.githubusercontent.com/u/1186631?v=3","gravatar_id":"","url":"https://api.github.com/users/tstrachota","html_url":"https://github.com/tstrachota","followers_url":"https://api.github.com/users/tstrachota/followers","following_url":"https://api.github.com/users/tstrachota/following{/other_user}","gists_url":"https://api.github.com/users/tstrachota/gists{/gist_id}","starred_url":"https://api.github.com/users/tstrachota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tstrachota/subscriptions","organizations_url":"https://api.github.com/users/tstrachota/orgs","repos_url":"https://api.github.com/users/tstrachota/repos","events_url":"https://api.github.com/users/tstrachota/events{/privacy}","received_events_url":"https://api.github.com/users/tstrachota/received_events","type":"User","site_admin":false},"repo":{"id":4674201,"name":"foreman","full_name":"tstrachota/foreman","owner":{"login":"tstrachota","id":1186631,"avatar_url":"https://avatars.githubusercontent.com/u/1186631?v=3","gravatar_id":"","url":"https://api.github.com/users/tstrachota","html_url":"https://github.com/tstrachota","followers_url":"https://api.github.com/users/tstrachota/followers","following_url":"https://api.github.com/users/tstrachota/following{/other_user}","gists_url":"https://api.github.com/users/tstrachota/gists{/gist_id}","starred_url":"https://api.github.com/users/tstrachota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tstrachota/subscriptions","organizations_url":"https://api.github.com/users/tstrachota/orgs","repos_url":"https://api.github.com/users/tstrachota/repos","events_url":"https://api.github.com/users/tstrachota/events{/privacy}","received_events_url":"https://api.github.com/users/tstrachota/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tstrachota/foreman","description":"an application that automates the lifecycle of servers ","fork":true,"url":"https://api.github.com/repos/tstrachota/foreman","forks_url":"https://api.github.com/repos/tstrachota/foreman/forks","keys_url":"https://api.github.com/repos/tstrachota/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tstrachota/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tstrachota/foreman/teams","hooks_url":"https://api.github.com/repos/tstrachota/foreman/hooks","issue_events_url":"https://api.github.com/repos/tstrachota/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/tstrachota/foreman/events","assignees_url":"https://api.github.com/repos/tstrachota/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/tstrachota/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/tstrachota/foreman/tags","blobs_url":"https://api.github.com/repos/tstrachota/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tstrachota/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tstrachota/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/tstrachota/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tstrachota/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/tstrachota/foreman/languages","stargazers_url":"https://api.github.com/repos/tstrachota/foreman/stargazers","contributors_url":"https://api.github.com/repos/tstrachota/foreman/contributors","subscribers_url":"https://api.github.com/repos/tstrachota/foreman/subscribers","subscription_url":"https://api.github.com/repos/tstrachota/foreman/subscription","commits_url":"https://api.github.com/repos/tstrachota/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/tstrachota/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/tstrachota/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/tstrachota/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/tstrachota/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/tstrachota/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tstrachota/foreman/merges","archive_url":"https://api.github.com/repos/tstrachota/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tstrachota/foreman/downloads","issues_url":"https://api.github.com/repos/tstrachota/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/tstrachota/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/tstrachota/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/tstrachota/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tstrachota/foreman/labels{/name}","releases_url":"https://api.github.com/repos/tstrachota/foreman/releases{/id}","created_at":"2012-06-15T11:11:21Z","updated_at":"2015-03-12T13:49:32Z","pushed_at":"2015-06-10T11:12:22Z","git_url":"git://github.com/tstrachota/foreman.git","ssh_url":"git@github.com:tstrachota/foreman.git","clone_url":"https://github.com/tstrachota/foreman.git","svn_url":"https://github.com/tstrachota/foreman","homepage":"http://theforeman.org","size":25120,"stargazers_count":2,"watchers_count":2,"language":"Gettext Catalog","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"develop"}},"base":{"label":"theforeman:develop","ref":"develop","sha":"01e7826068a340927b4dbe8b638f1bc9963f8a16","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":258750,"name":"foreman","full_name":"theforeman/foreman","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/foreman","description":"an application that automates the lifecycle of servers ","fork":false,"url":"https://api.github.com/repos/theforeman/foreman","forks_url":"https://api.github.com/repos/theforeman/foreman/forks","keys_url":"https://api.github.com/repos/theforeman/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/foreman/teams","hooks_url":"https://api.github.com/repos/theforeman/foreman/hooks","issue_events_url":"https://api.github.com/repos/theforeman/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/foreman/events","assignees_url":"https://api.github.com/repos/theforeman/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/foreman/tags","blobs_url":"https://api.github.com/repos/theforeman/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/foreman/languages","stargazers_url":"https://api.github.com/repos/theforeman/foreman/stargazers","contributors_url":"https://api.github.com/repos/theforeman/foreman/contributors","subscribers_url":"https://api.github.com/repos/theforeman/foreman/subscribers","subscription_url":"https://api.github.com/repos/theforeman/foreman/subscription","commits_url":"https://api.github.com/repos/theforeman/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/theforeman/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/foreman/merges","archive_url":"https://api.github.com/repos/theforeman/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/foreman/downloads","issues_url":"https://api.github.com/repos/theforeman/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/foreman/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/foreman/releases{/id}","created_at":"2009-07-23T15:07:00Z","updated_at":"2015-06-10T11:18:47Z","pushed_at":"2015-06-10T12:15:33Z","git_url":"git://github.com/theforeman/foreman.git","ssh_url":"git@github.com:theforeman/foreman.git","clone_url":"https://github.com/theforeman/foreman.git","svn_url":"https://github.com/theforeman/foreman","homepage":"http://theforeman.org","size":79080,"stargazers_count":774,"watchers_count":774,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":398,"mirror_url":null,"open_issues_count":81,"forks":398,"open_issues":81,"watchers":774,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2446"},"html":{"href":"https://github.com/theforeman/foreman/pull/2446"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman/issues/2446"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman/issues/2446/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2446/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2446/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman/statuses/557f97bbc4896ea7476abaf45c303c44e9fad4e0"}}}}