{"action":"created","comment":{"url":"https://api.github.com/repos/bethesque/pact_broker/pulls/comments/72713344","id":72713344,"diff_hunk":"@@ -0,0 +1,57 @@\n+describe \"Merging a pact\" do\n+\n+  let(:pact_content) { load_fixture('a_consumer-a_provider.json') }\n+  let(:path) { \"/pacts/provider/A%20Provider/consumer/A%20Consumer/version/1.2.3\" }\n+  let(:response_body_json) { JSON.parse(subject.body) }\n+\n+  subject do\n+    patch path, pact_content, {'CONTENT_TYPE' => 'application/json' }; last_response\n+  end\n+\n+  context \"when a pact for this consumer version does not exist\" do\n+    it \"returns a 201 Created\" do\n+      expect(subject.status).to be 201\n+    end\n+","path":"spec/features/merge_pact_spec.rb","position":15,"original_position":15,"commit_id":"03c03b4cf39af8fd3da0c2406292dc3a2d398dc4","original_commit_id":"03c03b4cf39af8fd3da0c2406292dc3a2d398dc4","user":{"login":"bethesque","id":446228,"avatar_url":"https://avatars.githubusercontent.com/u/446228?v=3","gravatar_id":"","url":"https://api.github.com/users/bethesque","html_url":"https://github.com/bethesque","followers_url":"https://api.github.com/users/bethesque/followers","following_url":"https://api.github.com/users/bethesque/following{/other_user}","gists_url":"https://api.github.com/users/bethesque/gists{/gist_id}","starred_url":"https://api.github.com/users/bethesque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bethesque/subscriptions","organizations_url":"https://api.github.com/users/bethesque/orgs","repos_url":"https://api.github.com/users/bethesque/repos","events_url":"https://api.github.com/users/bethesque/events{/privacy}","received_events_url":"https://api.github.com/users/bethesque/received_events","type":"User","site_admin":false},"body":"I'm not keen on having PATCH create the resource when it doesn't exist, but I can see why you did it.","created_at":"2016-07-28T22:17:03Z","updated_at":"2016-07-28T22:17:03Z","html_url":"https://github.com/bethesque/pact_broker/pull/52#discussion_r72713344","pull_request_url":"https://api.github.com/repos/bethesque/pact_broker/pulls/52","_links":{"self":{"href":"https://api.github.com/repos/bethesque/pact_broker/pulls/comments/72713344"},"html":{"href":"https://github.com/bethesque/pact_broker/pull/52#discussion_r72713344"},"pull_request":{"href":"https://api.github.com/repos/bethesque/pact_broker/pulls/52"}}},"pull_request":{"url":"https://api.github.com/repos/bethesque/pact_broker/pulls/52","id":79263232,"html_url":"https://github.com/bethesque/pact_broker/pull/52","diff_url":"https://github.com/bethesque/pact_broker/pull/52.diff","patch_url":"https://github.com/bethesque/pact_broker/pull/52.patch","issue_url":"https://api.github.com/repos/bethesque/pact_broker/issues/52","number":52,"state":"open","locked":false,"title":"Add ability to merge pacts via PATCH requests","user":{"login":"ThePletch","id":4468322,"avatar_url":"https://avatars.githubusercontent.com/u/4468322?v=3","gravatar_id":"","url":"https://api.github.com/users/ThePletch","html_url":"https://github.com/ThePletch","followers_url":"https://api.github.com/users/ThePletch/followers","following_url":"https://api.github.com/users/ThePletch/following{/other_user}","gists_url":"https://api.github.com/users/ThePletch/gists{/gist_id}","starred_url":"https://api.github.com/users/ThePletch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThePletch/subscriptions","organizations_url":"https://api.github.com/users/ThePletch/orgs","repos_url":"https://api.github.com/users/ThePletch/repos","events_url":"https://api.github.com/users/ThePletch/events{/privacy}","received_events_url":"https://api.github.com/users/ThePletch/received_events","type":"User","site_admin":false},"body":"Adds new endpoint `PATCH /pacts/provider/:provider_name/consumer/:consumer_name/versions/:consumer_version_number` that merges the same-version pact with an existing pact. Endpoint has identical restrictions and contract to the `PUT` method at the same path, differing only in function.","created_at":"2016-07-28T20:32:08Z","updated_at":"2016-07-28T22:17:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20a839987b1115741081b02a27653a7dcfdf131a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bethesque/pact_broker/pulls/52/commits","review_comments_url":"https://api.github.com/repos/bethesque/pact_broker/pulls/52/comments","review_comment_url":"https://api.github.com/repos/bethesque/pact_broker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bethesque/pact_broker/issues/52/comments","statuses_url":"https://api.github.com/repos/bethesque/pact_broker/statuses/03c03b4cf39af8fd3da0c2406292dc3a2d398dc4","head":{"label":"ThePletch:master","ref":"master","sha":"03c03b4cf39af8fd3da0c2406292dc3a2d398dc4","user":{"login":"ThePletch","id":4468322,"avatar_url":"https://avatars.githubusercontent.com/u/4468322?v=3","gravatar_id":"","url":"https://api.github.com/users/ThePletch","html_url":"https://github.com/ThePletch","followers_url":"https://api.github.com/users/ThePletch/followers","following_url":"https://api.github.com/users/ThePletch/following{/other_user}","gists_url":"https://api.github.com/users/ThePletch/gists{/gist_id}","starred_url":"https://api.github.com/users/ThePletch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThePletch/subscriptions","organizations_url":"https://api.github.com/users/ThePletch/orgs","repos_url":"https://api.github.com/users/ThePletch/repos","events_url":"https://api.github.com/users/ThePletch/events{/privacy}","received_events_url":"https://api.github.com/users/ThePletch/received_events","type":"User","site_admin":false},"repo":{"id":64162759,"name":"pact_broker","full_name":"ThePletch/pact_broker","owner":{"login":"ThePletch","id":4468322,"avatar_url":"https://avatars.githubusercontent.com/u/4468322?v=3","gravatar_id":"","url":"https://api.github.com/users/ThePletch","html_url":"https://github.com/ThePletch","followers_url":"https://api.github.com/users/ThePletch/followers","following_url":"https://api.github.com/users/ThePletch/following{/other_user}","gists_url":"https://api.github.com/users/ThePletch/gists{/gist_id}","starred_url":"https://api.github.com/users/ThePletch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThePletch/subscriptions","organizations_url":"https://api.github.com/users/ThePletch/orgs","repos_url":"https://api.github.com/users/ThePletch/repos","events_url":"https://api.github.com/users/ThePletch/events{/privacy}","received_events_url":"https://api.github.com/users/ThePletch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ThePletch/pact_broker","description":"The Pact Broker enables you to share your pacts between projects, and make them useful for people too.","fork":true,"url":"https://api.github.com/repos/ThePletch/pact_broker","forks_url":"https://api.github.com/repos/ThePletch/pact_broker/forks","keys_url":"https://api.github.com/repos/ThePletch/pact_broker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ThePletch/pact_broker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ThePletch/pact_broker/teams","hooks_url":"https://api.github.com/repos/ThePletch/pact_broker/hooks","issue_events_url":"https://api.github.com/repos/ThePletch/pact_broker/issues/events{/number}","events_url":"https://api.github.com/repos/ThePletch/pact_broker/events","assignees_url":"https://api.github.com/repos/ThePletch/pact_broker/assignees{/user}","branches_url":"https://api.github.com/repos/ThePletch/pact_broker/branches{/branch}","tags_url":"https://api.github.com/repos/ThePletch/pact_broker/tags","blobs_url":"https://api.github.com/repos/ThePletch/pact_broker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ThePletch/pact_broker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ThePletch/pact_broker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ThePletch/pact_broker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ThePletch/pact_broker/statuses/{sha}","languages_url":"https://api.github.com/repos/ThePletch/pact_broker/languages","stargazers_url":"https://api.github.com/repos/ThePletch/pact_broker/stargazers","contributors_url":"https://api.github.com/repos/ThePletch/pact_broker/contributors","subscribers_url":"https://api.github.com/repos/ThePletch/pact_broker/subscribers","subscription_url":"https://api.github.com/repos/ThePletch/pact_broker/subscription","commits_url":"https://api.github.com/repos/ThePletch/pact_broker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ThePletch/pact_broker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ThePletch/pact_broker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ThePletch/pact_broker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ThePletch/pact_broker/contents/{+path}","compare_url":"https://api.github.com/repos/ThePletch/pact_broker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ThePletch/pact_broker/merges","archive_url":"https://api.github.com/repos/ThePletch/pact_broker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ThePletch/pact_broker/downloads","issues_url":"https://api.github.com/repos/ThePletch/pact_broker/issues{/number}","pulls_url":"https://api.github.com/repos/ThePletch/pact_broker/pulls{/number}","milestones_url":"https://api.github.com/repos/ThePletch/pact_broker/milestones{/number}","notifications_url":"https://api.github.com/repos/ThePletch/pact_broker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ThePletch/pact_broker/labels{/name}","releases_url":"https://api.github.com/repos/ThePletch/pact_broker/releases{/id}","deployments_url":"https://api.github.com/repos/ThePletch/pact_broker/deployments","created_at":"2016-07-25T19:40:30Z","updated_at":"2016-07-25T19:40:31Z","pushed_at":"2016-07-28T20:34:34Z","git_url":"git://github.com/ThePletch/pact_broker.git","ssh_url":"git@github.com:ThePletch/pact_broker.git","clone_url":"https://github.com/ThePletch/pact_broker.git","svn_url":"https://github.com/ThePletch/pact_broker","homepage":"","size":1624,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"bethesque:master","ref":"master","sha":"bc416384318709b72bacf20b473cd54288d7b9a7","user":{"login":"bethesque","id":446228,"avatar_url":"https://avatars.githubusercontent.com/u/446228?v=3","gravatar_id":"","url":"https://api.github.com/users/bethesque","html_url":"https://github.com/bethesque","followers_url":"https://api.github.com/users/bethesque/followers","following_url":"https://api.github.com/users/bethesque/following{/other_user}","gists_url":"https://api.github.com/users/bethesque/gists{/gist_id}","starred_url":"https://api.github.com/users/bethesque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bethesque/subscriptions","organizations_url":"https://api.github.com/users/bethesque/orgs","repos_url":"https://api.github.com/users/bethesque/repos","events_url":"https://api.github.com/users/bethesque/events{/privacy}","received_events_url":"https://api.github.com/users/bethesque/received_events","type":"User","site_admin":false},"repo":{"id":13830051,"name":"pact_broker","full_name":"bethesque/pact_broker","owner":{"login":"bethesque","id":446228,"avatar_url":"https://avatars.githubusercontent.com/u/446228?v=3","gravatar_id":"","url":"https://api.github.com/users/bethesque","html_url":"https://github.com/bethesque","followers_url":"https://api.github.com/users/bethesque/followers","following_url":"https://api.github.com/users/bethesque/following{/other_user}","gists_url":"https://api.github.com/users/bethesque/gists{/gist_id}","starred_url":"https://api.github.com/users/bethesque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bethesque/subscriptions","organizations_url":"https://api.github.com/users/bethesque/orgs","repos_url":"https://api.github.com/users/bethesque/repos","events_url":"https://api.github.com/users/bethesque/events{/privacy}","received_events_url":"https://api.github.com/users/bethesque/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bethesque/pact_broker","description":"The Pact Broker enables you to share your pacts between projects, and make them useful for people too.","fork":false,"url":"https://api.github.com/repos/bethesque/pact_broker","forks_url":"https://api.github.com/repos/bethesque/pact_broker/forks","keys_url":"https://api.github.com/repos/bethesque/pact_broker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bethesque/pact_broker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bethesque/pact_broker/teams","hooks_url":"https://api.github.com/repos/bethesque/pact_broker/hooks","issue_events_url":"https://api.github.com/repos/bethesque/pact_broker/issues/events{/number}","events_url":"https://api.github.com/repos/bethesque/pact_broker/events","assignees_url":"https://api.github.com/repos/bethesque/pact_broker/assignees{/user}","branches_url":"https://api.github.com/repos/bethesque/pact_broker/branches{/branch}","tags_url":"https://api.github.com/repos/bethesque/pact_broker/tags","blobs_url":"https://api.github.com/repos/bethesque/pact_broker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bethesque/pact_broker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bethesque/pact_broker/git/refs{/sha}","trees_url":"https://api.github.com/repos/bethesque/pact_broker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bethesque/pact_broker/statuses/{sha}","languages_url":"https://api.github.com/repos/bethesque/pact_broker/languages","stargazers_url":"https://api.github.com/repos/bethesque/pact_broker/stargazers","contributors_url":"https://api.github.com/repos/bethesque/pact_broker/contributors","subscribers_url":"https://api.github.com/repos/bethesque/pact_broker/subscribers","subscription_url":"https://api.github.com/repos/bethesque/pact_broker/subscription","commits_url":"https://api.github.com/repos/bethesque/pact_broker/commits{/sha}","git_commits_url":"https://api.github.com/repos/bethesque/pact_broker/git/commits{/sha}","comments_url":"https://api.github.com/repos/bethesque/pact_broker/comments{/number}","issue_comment_url":"https://api.github.com/repos/bethesque/pact_broker/issues/comments{/number}","contents_url":"https://api.github.com/repos/bethesque/pact_broker/contents/{+path}","compare_url":"https://api.github.com/repos/bethesque/pact_broker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bethesque/pact_broker/merges","archive_url":"https://api.github.com/repos/bethesque/pact_broker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bethesque/pact_broker/downloads","issues_url":"https://api.github.com/repos/bethesque/pact_broker/issues{/number}","pulls_url":"https://api.github.com/repos/bethesque/pact_broker/pulls{/number}","milestones_url":"https://api.github.com/repos/bethesque/pact_broker/milestones{/number}","notifications_url":"https://api.github.com/repos/bethesque/pact_broker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bethesque/pact_broker/labels{/name}","releases_url":"https://api.github.com/repos/bethesque/pact_broker/releases{/id}","deployments_url":"https://api.github.com/repos/bethesque/pact_broker/deployments","created_at":"2013-10-24T11:15:22Z","updated_at":"2016-07-28T14:28:30Z","pushed_at":"2016-07-28T20:34:35Z","git_url":"git://github.com/bethesque/pact_broker.git","ssh_url":"git@github.com:bethesque/pact_broker.git","clone_url":"https://github.com/bethesque/pact_broker.git","svn_url":"https://github.com/bethesque/pact_broker","homepage":"","size":1617,"stargazers_count":123,"watchers_count":123,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":12,"forks":28,"open_issues":12,"watchers":123,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bethesque/pact_broker/pulls/52"},"html":{"href":"https://github.com/bethesque/pact_broker/pull/52"},"issue":{"href":"https://api.github.com/repos/bethesque/pact_broker/issues/52"},"comments":{"href":"https://api.github.com/repos/bethesque/pact_broker/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/bethesque/pact_broker/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/bethesque/pact_broker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bethesque/pact_broker/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/bethesque/pact_broker/statuses/03c03b4cf39af8fd3da0c2406292dc3a2d398dc4"}}}}
{"actor":{"display_login":"bethesque"}}