{"action":"created","comment":{"url":"https://api.github.com/repos/gocd/gocd/pulls/comments/65029408","id":65029408,"diff_hunk":"@@ -0,0 +1,310 @@\n+##########################################################################\n+# Copyright 2016 ThoughtWorks, Inc.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+##########################################################################\n+\n+require 'spec_helper'\n+\n+describe ApiV1::Admin::PluggableScmsController do\n+  before :each do\n+    @scm = SCM.new(\"1\", PluginConfiguration.new(\"github.pr\", \"1\"),\n+                   Configuration.new(ConfigurationProperty.new(ConfigurationKey.new(\"url\"), ConfigurationValue.new(\"some-url\"))))\n+    @scm.setName('material')\n+    @pluggable_scm_service = double('pluggable_scm_service')\n+    controller.stub(:pluggable_scm_service).and_return(@pluggable_scm_service)\n+  end\n+\n+  describe :index do\n+    describe 'authorization_check' do\n+      it 'should allow all with security disabled' do\n+        disable_security\n+\n+        expect(controller).to allow_action(:get, :index)\n+      end\n+\n+      it 'should disallow anonymous users, with security enabled' do\n+        enable_security\n+        login_as_anonymous\n+\n+        expect(controller).to disallow_action(:get, :index).with(401, 'You are not authorized to perform this action.')\n+      end\n+\n+      it 'should disallow normal users, with security enabled' do\n+        enable_security\n+        login_as_user\n+\n+        expect(controller).to disallow_action(:get, :index).with(401, 'You are not authorized to perform this action.')\n+      end\n+\n+      it 'should allow admin, with security enabled' do\n+        enable_security\n+        login_as_admin\n+\n+        expect(controller).to allow_action(:get, :index)\n+      end\n+    end\n+    describe 'admin' do\n+      it 'should list all pluggable scm materials' do\n+        enable_security\n+        login_as_admin\n+\n+        scms = ApiV1::Scms::PluggableScmsRepresenter.new([@scm]).to_hash(url_builder: UrlBuilder.new)\n+        @pluggable_scm_service.should_receive(:listAllScms).and_return([@scm])\n+\n+        get_with_api_header :index\n+\n+        expect(response.code).to eq('200')\n+        expect(actual_response).to eq(JSON.parse(scms.to_json).deep_symbolize_keys)\n+      end\n+    end\n+  end\n+\n+  describe :show do\n+    describe 'authorization_check' do\n+      it 'should allow all with security disabled' do\n+        disable_security\n+\n+        expect(controller).to allow_action(:get, :show)\n+      end\n+\n+      it 'should disallow anonymous users, with security enabled' do\n+        enable_security\n+        login_as_anonymous\n+\n+        expect(controller).to disallow_action(:get, :show, material_name: 'foo').with(401, 'You are not authorized to perform this action.')\n+      end\n+\n+      it 'should disallow normal users, with security enabled' do\n+        enable_security\n+        login_as_user\n+\n+        expect(controller).to disallow_action(:get, :show, material_name: 'foo').with(401, 'You are not authorized to perform this action.')\n+      end\n+\n+      it 'should allow admin, with security enabled' do\n+        enable_security\n+        login_as_admin\n+\n+        expect(controller).to allow_action(:get, :show)\n+      end\n+\n+    end\n+    describe 'admin' do\n+\n+      before(:each) do\n+        enable_security\n+        login_as_admin\n+      end\n+\n+      it 'should render the pluggable scm material of specified name' do\n+        scm = ApiV1::Scms::PluggableScmRepresenter.new(@scm).to_hash(url_builder: UrlBuilder.new)\n+        @pluggable_scm_service.should_receive(:findPluggableScmMaterial).with('material').and_return(@scm)\n+\n+        get_with_api_header :show, material_name: 'material'\n+\n+        expect(response.code).to eq('200')\n+        expect(actual_response).to eq(JSON.parse(scm.to_json).deep_symbolize_keys)\n+      end\n+\n+      it 'should return 404 if the pluggable scm material does not exist' do\n+        @pluggable_scm_service.should_receive(:findPluggableScmMaterial).with('non-existent-material').and_return(nil)\n+\n+        get_with_api_header :show, material_name: 'non-existent-material'\n+\n+        expect(response.code).to eq('404')\n+      end\n+    end\n+  end\n+\n+  describe :create do\n+    describe 'authorization_check' do\n+      it 'should allow all with security disabled' do\n+        disable_security\n+\n+        expect(controller).to allow_action(:post, :create)\n+      end\n+\n+      it 'should disallow anonymous users, with security enabled' do\n+        enable_security\n+        login_as_anonymous\n+\n+        expect(controller).to disallow_action(:post, :create).with(401, 'You are not authorized to perform this action.')\n+      end\n+\n+      it 'should disallow normal users, with security enabled' do\n+        enable_security\n+        login_as_user\n+\n+        expect(controller).to disallow_action(:post, :create).with(401, 'You are not authorized to perform this action.')\n+      end\n+\n+      it 'should allow admin, with security enabled' do\n+        enable_security\n+        login_as_admin\n+\n+        expect(controller).to allow_action(:post, :create)\n+      end\n+\n+    end\n+\n+    describe 'admin' do\n+      before(:each) do\n+        enable_security\n+        login_as_admin\n+      end\n+\n+      it 'should deserialize scm object from given parameters' do\n+        hash = {id: 'scm-id', name: 'foo', auto_update: false, plugin_configuration: {id: 'github.pr', version: '1'}, configuration: [{\"key\" => 'url', \"value\" => 'git@github.com:foo/bar.git'}, {\"key\" => 'password', \"encrypted_value\" => 'baz'}]}\n+        @pluggable_scm_service.should_receive(:createPluggableScmMaterial).with(anything, an_instance_of(SCM), anything)\n+\n+        post_with_api_header :create, hash\n+\n+        expect(response.code).to eq('200')\n+        real_response = actual_response\n+        real_response.delete(:_links)\n+        expect(real_response).to eq(hash)\n+\n+      end\n+\n+      it 'should generate id if id is not provided by user' do\n+        hash = {name: 'foo', auto_update: false, plugin_configuration: {id: 'github.pr', version: '1'}, configuration: [{\"key\" => 'url', \"value\" => 'git@github.com:foo/bar.git'}, {\"key\" => 'password', \"encrypted_value\" => 'baz'}]}\n+        @pluggable_scm_service.should_receive(:createPluggableScmMaterial).with(anything, an_instance_of(SCM), anything)\n+\n+        post_with_api_header :create, hash\n+\n+        expect(actual_response).to have_key(:id)\n+      end\n+\n+      it 'should fail save if validation has failed' do\n+        result = double('HttpLocalizedOperationResult')\n+        HttpLocalizedOperationResult.stub(:new).and_return(result)\n+        result.stub(:isSuccessful).and_return(false)\n+        result.stub(:message).with(anything()).and_return(\"Save failed\")\n+        result.stub(:httpCode).and_return(422)\n+        @pluggable_scm_service.should_receive(:createPluggableScmMaterial).with(anything, an_instance_of(SCM), result)\n+\n+        post_with_api_header :create\n+\n+        expect(response.code).to eq('422')\n+        expect(actual_response[:message]).to eq(\"Save failed\")\n+      end\n+    end\n+  end\n+\n+  describe :update do\n+    describe 'authorization_check' do\n+      it 'should allow all with security disabled' do\n+        disable_security\n+\n+        expect(controller).to allow_action(:put, :update)\n+      end\n+\n+      it 'should disallow anonymous users, with security enabled' do\n+        enable_security\n+        login_as_anonymous\n+\n+        expect(controller).to disallow_action(:put, :update, material_name: 'foo').with(401, 'You are not authorized to perform this action.')\n+      end\n+\n+      it 'should disallow normal users, with security enabled' do\n+        enable_security\n+        login_as_user\n+\n+        expect(controller).to disallow_action(:put, :update, material_name: 'foo').with(401, 'You are not authorized to perform this action.')\n+      end\n+\n+      it 'should allow admin, with security enabled' do\n+        enable_security\n+        login_as_admin\n+\n+        expect(controller).to allow_action(:put, :update)\n+      end\n+\n+    end\n+    describe 'admin' do\n+      before(:each) do\n+        enable_security\n+        login_as_admin\n+      end\n+\n+      it 'should deserialize scm object from given parameters' do\n+        controller.stub(:check_for_stale_request).and_return(nil)\n+        hash = {id: '1', name: 'material', auto_update: false, plugin_configuration: {id: 'github.pr', version: '1'}, configuration: [{\"key\" => 'url', \"value\" => 'git@github.com:foo/bar.git'}]}\n+        @pluggable_scm_service.should_receive(:updatePluggableScmMaterial).with(anything, an_instance_of(SCM), anything)\n+        params = {material_name: 'material', id: '1', name: 'material', auto_update: false, plugin_configuration: {id: 'github.pr', version: '1'}, configuration: [{\"key\" => 'url', \"value\" => 'git@github.com:foo/bar.git'}]}\n+        put_with_api_header :update, params\n+\n+        expect(response.code).to eq('200')\n+        real_response = actual_response\n+        real_response.delete(:_links)\n+        expect(real_response).to eq(hash)\n+      end\n+\n+      it 'should not allow rename of material name' do\n+        controller.stub(:check_for_stale_request).and_return(nil)\n+        params = {material_name: 'foo', id: '1', name: 'material', auto_update: false, plugin_configuration: {id: 'github.pr', version: '1'}, configuration: [{\"key\" => 'url', \"value\" => 'git@github.com:foo/bar.git'}]}\n+\n+        put_with_api_header :update, params\n+\n+        expect(response.code).to eq('406')\n+        expect(actual_response[:message]).to eq('Renaming of SCM material is not supported by this API.')\n+\n+      end\n+\n+      it 'should not update existing material if validations fail' do\n+        controller.stub(:check_for_stale_request).and_return(nil)\n+        controller.stub(:check_for_scm_rename).and_return(nil)\n+        result = double('HttpLocalizedOperationResult')\n+        HttpLocalizedOperationResult.stub(:new).and_return(result)\n+        result.stub(:isSuccessful).and_return(false)\n+        result.stub(:message).with(anything()).and_return(\"Update failed\")\n+        result.stub(:httpCode).and_return(422)\n+        @pluggable_scm_service.should_receive(:updatePluggableScmMaterial).with(anything, an_instance_of(SCM), result)","path":"server/webapp/WEB-INF/rails.new/spec/controllers/api_v1/admin/pluggable_scms_controller_spec.rb","position":273,"original_position":273,"commit_id":"9a7688dfca9f206cb8e2134082cb6f142754e8af","original_commit_id":"9a7688dfca9f206cb8e2134082cb6f142754e8af","user":{"login":"ketan","id":10598,"avatar_url":"https://avatars.githubusercontent.com/u/10598?v=3","gravatar_id":"","url":"https://api.github.com/users/ketan","html_url":"https://github.com/ketan","followers_url":"https://api.github.com/users/ketan/followers","following_url":"https://api.github.com/users/ketan/following{/other_user}","gists_url":"https://api.github.com/users/ketan/gists{/gist_id}","starred_url":"https://api.github.com/users/ketan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ketan/subscriptions","organizations_url":"https://api.github.com/users/ketan/orgs","repos_url":"https://api.github.com/users/ketan/repos","events_url":"https://api.github.com/users/ketan/events{/privacy}","received_events_url":"https://api.github.com/users/ketan/received_events","type":"User","site_admin":false},"body":"You've already tested that `updatePluggableScmMaterial` is called. So instead of mocks returning mocks (which is a really bad antipattern, that should be avoided like a plague), what you want to do here is to `stub` the `updatePluggableScmMaterial` —\r\n\r\n```ruby\r\n@pluggable_scm_service.stub(:updatePluggableScmMaterial).with(....) do |..., result|\r\n  result.unprocessableEntity(...)\r\nend\r\n```","created_at":"2016-05-30T06:35:50Z","updated_at":"2016-05-30T06:35:50Z","html_url":"https://github.com/gocd/gocd/pull/2234#discussion_r65029408","pull_request_url":"https://api.github.com/repos/gocd/gocd/pulls/2234","_links":{"self":{"href":"https://api.github.com/repos/gocd/gocd/pulls/comments/65029408"},"html":{"href":"https://github.com/gocd/gocd/pull/2234#discussion_r65029408"},"pull_request":{"href":"https://api.github.com/repos/gocd/gocd/pulls/2234"}}},"pull_request":{"url":"https://api.github.com/repos/gocd/gocd/pulls/2234","id":71849814,"html_url":"https://github.com/gocd/gocd/pull/2234","diff_url":"https://github.com/gocd/gocd/pull/2234.diff","patch_url":"https://github.com/gocd/gocd/pull/2234.patch","issue_url":"https://api.github.com/repos/gocd/gocd/issues/2234","number":2234,"state":"open","locked":false,"title":"Pluggable SCM API - get, post and edit (#1508)","user":{"login":"varshavaradarajan","id":4715748,"avatar_url":"https://avatars.githubusercontent.com/u/4715748?v=3","gravatar_id":"","url":"https://api.github.com/users/varshavaradarajan","html_url":"https://github.com/varshavaradarajan","followers_url":"https://api.github.com/users/varshavaradarajan/followers","following_url":"https://api.github.com/users/varshavaradarajan/following{/other_user}","gists_url":"https://api.github.com/users/varshavaradarajan/gists{/gist_id}","starred_url":"https://api.github.com/users/varshavaradarajan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varshavaradarajan/subscriptions","organizations_url":"https://api.github.com/users/varshavaradarajan/orgs","repos_url":"https://api.github.com/users/varshavaradarajan/repos","events_url":"https://api.github.com/users/varshavaradarajan/events{/privacy}","received_events_url":"https://api.github.com/users/varshavaradarajan/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-30T03:49:33Z","updated_at":"2016-05-30T06:35:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9fc83686f743210c5adeb9b143a8912cefc78feb","assignee":{"login":"ketan","id":10598,"avatar_url":"https://avatars.githubusercontent.com/u/10598?v=3","gravatar_id":"","url":"https://api.github.com/users/ketan","html_url":"https://github.com/ketan","followers_url":"https://api.github.com/users/ketan/followers","following_url":"https://api.github.com/users/ketan/following{/other_user}","gists_url":"https://api.github.com/users/ketan/gists{/gist_id}","starred_url":"https://api.github.com/users/ketan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ketan/subscriptions","organizations_url":"https://api.github.com/users/ketan/orgs","repos_url":"https://api.github.com/users/ketan/repos","events_url":"https://api.github.com/users/ketan/events{/privacy}","received_events_url":"https://api.github.com/users/ketan/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/gocd/gocd/pulls/2234/commits","review_comments_url":"https://api.github.com/repos/gocd/gocd/pulls/2234/comments","review_comment_url":"https://api.github.com/repos/gocd/gocd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gocd/gocd/issues/2234/comments","statuses_url":"https://api.github.com/repos/gocd/gocd/statuses/9a7688dfca9f206cb8e2134082cb6f142754e8af","head":{"label":"varshavaradarajan:pscm-api","ref":"pscm-api","sha":"9a7688dfca9f206cb8e2134082cb6f142754e8af","user":{"login":"varshavaradarajan","id":4715748,"avatar_url":"https://avatars.githubusercontent.com/u/4715748?v=3","gravatar_id":"","url":"https://api.github.com/users/varshavaradarajan","html_url":"https://github.com/varshavaradarajan","followers_url":"https://api.github.com/users/varshavaradarajan/followers","following_url":"https://api.github.com/users/varshavaradarajan/following{/other_user}","gists_url":"https://api.github.com/users/varshavaradarajan/gists{/gist_id}","starred_url":"https://api.github.com/users/varshavaradarajan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varshavaradarajan/subscriptions","organizations_url":"https://api.github.com/users/varshavaradarajan/orgs","repos_url":"https://api.github.com/users/varshavaradarajan/repos","events_url":"https://api.github.com/users/varshavaradarajan/events{/privacy}","received_events_url":"https://api.github.com/users/varshavaradarajan/received_events","type":"User","site_admin":false},"repo":{"id":48975000,"name":"gocd","full_name":"varshavaradarajan/gocd","owner":{"login":"varshavaradarajan","id":4715748,"avatar_url":"https://avatars.githubusercontent.com/u/4715748?v=3","gravatar_id":"","url":"https://api.github.com/users/varshavaradarajan","html_url":"https://github.com/varshavaradarajan","followers_url":"https://api.github.com/users/varshavaradarajan/followers","following_url":"https://api.github.com/users/varshavaradarajan/following{/other_user}","gists_url":"https://api.github.com/users/varshavaradarajan/gists{/gist_id}","starred_url":"https://api.github.com/users/varshavaradarajan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varshavaradarajan/subscriptions","organizations_url":"https://api.github.com/users/varshavaradarajan/orgs","repos_url":"https://api.github.com/users/varshavaradarajan/repos","events_url":"https://api.github.com/users/varshavaradarajan/events{/privacy}","received_events_url":"https://api.github.com/users/varshavaradarajan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/varshavaradarajan/gocd","description":"Main repository for Go Continuous Delivery","fork":true,"url":"https://api.github.com/repos/varshavaradarajan/gocd","forks_url":"https://api.github.com/repos/varshavaradarajan/gocd/forks","keys_url":"https://api.github.com/repos/varshavaradarajan/gocd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/varshavaradarajan/gocd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/varshavaradarajan/gocd/teams","hooks_url":"https://api.github.com/repos/varshavaradarajan/gocd/hooks","issue_events_url":"https://api.github.com/repos/varshavaradarajan/gocd/issues/events{/number}","events_url":"https://api.github.com/repos/varshavaradarajan/gocd/events","assignees_url":"https://api.github.com/repos/varshavaradarajan/gocd/assignees{/user}","branches_url":"https://api.github.com/repos/varshavaradarajan/gocd/branches{/branch}","tags_url":"https://api.github.com/repos/varshavaradarajan/gocd/tags","blobs_url":"https://api.github.com/repos/varshavaradarajan/gocd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/varshavaradarajan/gocd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/varshavaradarajan/gocd/git/refs{/sha}","trees_url":"https://api.github.com/repos/varshavaradarajan/gocd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/varshavaradarajan/gocd/statuses/{sha}","languages_url":"https://api.github.com/repos/varshavaradarajan/gocd/languages","stargazers_url":"https://api.github.com/repos/varshavaradarajan/gocd/stargazers","contributors_url":"https://api.github.com/repos/varshavaradarajan/gocd/contributors","subscribers_url":"https://api.github.com/repos/varshavaradarajan/gocd/subscribers","subscription_url":"https://api.github.com/repos/varshavaradarajan/gocd/subscription","commits_url":"https://api.github.com/repos/varshavaradarajan/gocd/commits{/sha}","git_commits_url":"https://api.github.com/repos/varshavaradarajan/gocd/git/commits{/sha}","comments_url":"https://api.github.com/repos/varshavaradarajan/gocd/comments{/number}","issue_comment_url":"https://api.github.com/repos/varshavaradarajan/gocd/issues/comments{/number}","contents_url":"https://api.github.com/repos/varshavaradarajan/gocd/contents/{+path}","compare_url":"https://api.github.com/repos/varshavaradarajan/gocd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/varshavaradarajan/gocd/merges","archive_url":"https://api.github.com/repos/varshavaradarajan/gocd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/varshavaradarajan/gocd/downloads","issues_url":"https://api.github.com/repos/varshavaradarajan/gocd/issues{/number}","pulls_url":"https://api.github.com/repos/varshavaradarajan/gocd/pulls{/number}","milestones_url":"https://api.github.com/repos/varshavaradarajan/gocd/milestones{/number}","notifications_url":"https://api.github.com/repos/varshavaradarajan/gocd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/varshavaradarajan/gocd/labels{/name}","releases_url":"https://api.github.com/repos/varshavaradarajan/gocd/releases{/id}","deployments_url":"https://api.github.com/repos/varshavaradarajan/gocd/deployments","created_at":"2016-01-04T04:38:44Z","updated_at":"2016-01-11T03:40:26Z","pushed_at":"2016-05-30T05:33:40Z","git_url":"git://github.com/varshavaradarajan/gocd.git","ssh_url":"git@github.com:varshavaradarajan/gocd.git","clone_url":"https://github.com/varshavaradarajan/gocd.git","svn_url":"https://github.com/varshavaradarajan/gocd","homepage":"https://go.cd","size":232607,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"gocd:master","ref":"master","sha":"5e3832ce7fe9fe79b0b42e3388d55c5196e89c41","user":{"login":"gocd","id":6099846,"avatar_url":"https://avatars.githubusercontent.com/u/6099846?v=3","gravatar_id":"","url":"https://api.github.com/users/gocd","html_url":"https://github.com/gocd","followers_url":"https://api.github.com/users/gocd/followers","following_url":"https://api.github.com/users/gocd/following{/other_user}","gists_url":"https://api.github.com/users/gocd/gists{/gist_id}","starred_url":"https://api.github.com/users/gocd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gocd/subscriptions","organizations_url":"https://api.github.com/users/gocd/orgs","repos_url":"https://api.github.com/users/gocd/repos","events_url":"https://api.github.com/users/gocd/events{/privacy}","received_events_url":"https://api.github.com/users/gocd/received_events","type":"Organization","site_admin":false},"repo":{"id":15155534,"name":"gocd","full_name":"gocd/gocd","owner":{"login":"gocd","id":6099846,"avatar_url":"https://avatars.githubusercontent.com/u/6099846?v=3","gravatar_id":"","url":"https://api.github.com/users/gocd","html_url":"https://github.com/gocd","followers_url":"https://api.github.com/users/gocd/followers","following_url":"https://api.github.com/users/gocd/following{/other_user}","gists_url":"https://api.github.com/users/gocd/gists{/gist_id}","starred_url":"https://api.github.com/users/gocd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gocd/subscriptions","organizations_url":"https://api.github.com/users/gocd/orgs","repos_url":"https://api.github.com/users/gocd/repos","events_url":"https://api.github.com/users/gocd/events{/privacy}","received_events_url":"https://api.github.com/users/gocd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gocd/gocd","description":"Main repository for GoCD - Continuous Delivery server","fork":false,"url":"https://api.github.com/repos/gocd/gocd","forks_url":"https://api.github.com/repos/gocd/gocd/forks","keys_url":"https://api.github.com/repos/gocd/gocd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gocd/gocd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gocd/gocd/teams","hooks_url":"https://api.github.com/repos/gocd/gocd/hooks","issue_events_url":"https://api.github.com/repos/gocd/gocd/issues/events{/number}","events_url":"https://api.github.com/repos/gocd/gocd/events","assignees_url":"https://api.github.com/repos/gocd/gocd/assignees{/user}","branches_url":"https://api.github.com/repos/gocd/gocd/branches{/branch}","tags_url":"https://api.github.com/repos/gocd/gocd/tags","blobs_url":"https://api.github.com/repos/gocd/gocd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gocd/gocd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gocd/gocd/git/refs{/sha}","trees_url":"https://api.github.com/repos/gocd/gocd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gocd/gocd/statuses/{sha}","languages_url":"https://api.github.com/repos/gocd/gocd/languages","stargazers_url":"https://api.github.com/repos/gocd/gocd/stargazers","contributors_url":"https://api.github.com/repos/gocd/gocd/contributors","subscribers_url":"https://api.github.com/repos/gocd/gocd/subscribers","subscription_url":"https://api.github.com/repos/gocd/gocd/subscription","commits_url":"https://api.github.com/repos/gocd/gocd/commits{/sha}","git_commits_url":"https://api.github.com/repos/gocd/gocd/git/commits{/sha}","comments_url":"https://api.github.com/repos/gocd/gocd/comments{/number}","issue_comment_url":"https://api.github.com/repos/gocd/gocd/issues/comments{/number}","contents_url":"https://api.github.com/repos/gocd/gocd/contents/{+path}","compare_url":"https://api.github.com/repos/gocd/gocd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gocd/gocd/merges","archive_url":"https://api.github.com/repos/gocd/gocd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gocd/gocd/downloads","issues_url":"https://api.github.com/repos/gocd/gocd/issues{/number}","pulls_url":"https://api.github.com/repos/gocd/gocd/pulls{/number}","milestones_url":"https://api.github.com/repos/gocd/gocd/milestones{/number}","notifications_url":"https://api.github.com/repos/gocd/gocd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gocd/gocd/labels{/name}","releases_url":"https://api.github.com/repos/gocd/gocd/releases{/id}","deployments_url":"https://api.github.com/repos/gocd/gocd/deployments","created_at":"2013-12-13T05:26:16Z","updated_at":"2016-05-28T14:47:14Z","pushed_at":"2016-05-30T06:35:00Z","git_url":"git://github.com/gocd/gocd.git","ssh_url":"git@github.com:gocd/gocd.git","clone_url":"https://github.com/gocd/gocd.git","svn_url":"https://github.com/gocd/gocd","homepage":"https://go.cd","size":306901,"stargazers_count":2397,"watchers_count":2397,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":425,"mirror_url":null,"open_issues_count":719,"forks":425,"open_issues":719,"watchers":2397,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gocd/gocd/pulls/2234"},"html":{"href":"https://github.com/gocd/gocd/pull/2234"},"issue":{"href":"https://api.github.com/repos/gocd/gocd/issues/2234"},"comments":{"href":"https://api.github.com/repos/gocd/gocd/issues/2234/comments"},"review_comments":{"href":"https://api.github.com/repos/gocd/gocd/pulls/2234/comments"},"review_comment":{"href":"https://api.github.com/repos/gocd/gocd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gocd/gocd/pulls/2234/commits"},"statuses":{"href":"https://api.github.com/repos/gocd/gocd/statuses/9a7688dfca9f206cb8e2134082cb6f142754e8af"}}}}
{"actor":{"display_login":"ketan"}}