{"action":"closed","number":5,"pull_request":{"url":"https://api.github.com/repos/Magnetme/consultant/pulls/5","id":52872767,"html_url":"https://github.com/Magnetme/consultant/pull/5","diff_url":"https://github.com/Magnetme/consultant/pull/5.diff","patch_url":"https://github.com/Magnetme/consultant/pull/5.patch","issue_url":"https://api.github.com/repos/Magnetme/consultant/issues/5","number":5,"state":"closed","locked":false,"title":"Add support for service registration and deregistration.","user":{"login":"michaeldejong","id":794529,"avatar_url":"https://avatars.githubusercontent.com/u/794529?v=3","gravatar_id":"","url":"https://api.github.com/users/michaeldejong","html_url":"https://github.com/michaeldejong","followers_url":"https://api.github.com/users/michaeldejong/followers","following_url":"https://api.github.com/users/michaeldejong/following{/other_user}","gists_url":"https://api.github.com/users/michaeldejong/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeldejong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeldejong/subscriptions","organizations_url":"https://api.github.com/users/michaeldejong/orgs","repos_url":"https://api.github.com/users/michaeldejong/repos","events_url":"https://api.github.com/users/michaeldejong/events{/privacy}","received_events_url":"https://api.github.com/users/michaeldejong/received_events","type":"User","site_admin":false},"body":"Allows us to register and deregister services to and from Consul.\r\n\r\nCurrently we do assign a random UUID to the `instance` variable in the `ServiceIdentifier` class, if no instance is specified through the environment variables. In that case a service (with a random UUID) is registered to Consul, and failing to deregister that service, will cause it to linger forever in Consul (until someone removes it with an API call).\r\n\r\nTo combat this, the `INSTANCE` variable should be defined explicitly in the environment variables.\r\n\r\nUnfortunately also no tests, since this functionality is directly interacting with Consul and we typically mock these interactions to test higher-level behaviour.","created_at":"2015-12-07T17:12:24Z","updated_at":"2015-12-08T09:58:01Z","closed_at":"2015-12-08T09:58:01Z","merged_at":"2015-12-08T09:58:01Z","merge_commit_sha":"f0ea309e6ae2e7664b94bc3a8d438ea94b88d39b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Magnetme/consultant/pulls/5/commits","review_comments_url":"https://api.github.com/repos/Magnetme/consultant/pulls/5/comments","review_comment_url":"https://api.github.com/repos/Magnetme/consultant/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Magnetme/consultant/issues/5/comments","statuses_url":"https://api.github.com/repos/Magnetme/consultant/statuses/b543bf3dd23eec0971281faf0668e2a03d9854e6","head":{"label":"Magnetme:service-registration","ref":"service-registration","sha":"b543bf3dd23eec0971281faf0668e2a03d9854e6","user":{"login":"Magnetme","id":3966050,"avatar_url":"https://avatars.githubusercontent.com/u/3966050?v=3","gravatar_id":"","url":"https://api.github.com/users/Magnetme","html_url":"https://github.com/Magnetme","followers_url":"https://api.github.com/users/Magnetme/followers","following_url":"https://api.github.com/users/Magnetme/following{/other_user}","gists_url":"https://api.github.com/users/Magnetme/gists{/gist_id}","starred_url":"https://api.github.com/users/Magnetme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Magnetme/subscriptions","organizations_url":"https://api.github.com/users/Magnetme/orgs","repos_url":"https://api.github.com/users/Magnetme/repos","events_url":"https://api.github.com/users/Magnetme/events{/privacy}","received_events_url":"https://api.github.com/users/Magnetme/received_events","type":"Organization","site_admin":false},"repo":{"id":44705844,"name":"consultant","full_name":"Magnetme/consultant","owner":{"login":"Magnetme","id":3966050,"avatar_url":"https://avatars.githubusercontent.com/u/3966050?v=3","gravatar_id":"","url":"https://api.github.com/users/Magnetme","html_url":"https://github.com/Magnetme","followers_url":"https://api.github.com/users/Magnetme/followers","following_url":"https://api.github.com/users/Magnetme/following{/other_user}","gists_url":"https://api.github.com/users/Magnetme/gists{/gist_id}","starred_url":"https://api.github.com/users/Magnetme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Magnetme/subscriptions","organizations_url":"https://api.github.com/users/Magnetme/orgs","repos_url":"https://api.github.com/users/Magnetme/repos","events_url":"https://api.github.com/users/Magnetme/events{/privacy}","received_events_url":"https://api.github.com/users/Magnetme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Magnetme/consultant","description":"A library to retrieve your service's configuration from Consul, and subscribe to changes.","fork":false,"url":"https://api.github.com/repos/Magnetme/consultant","forks_url":"https://api.github.com/repos/Magnetme/consultant/forks","keys_url":"https://api.github.com/repos/Magnetme/consultant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Magnetme/consultant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Magnetme/consultant/teams","hooks_url":"https://api.github.com/repos/Magnetme/consultant/hooks","issue_events_url":"https://api.github.com/repos/Magnetme/consultant/issues/events{/number}","events_url":"https://api.github.com/repos/Magnetme/consultant/events","assignees_url":"https://api.github.com/repos/Magnetme/consultant/assignees{/user}","branches_url":"https://api.github.com/repos/Magnetme/consultant/branches{/branch}","tags_url":"https://api.github.com/repos/Magnetme/consultant/tags","blobs_url":"https://api.github.com/repos/Magnetme/consultant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Magnetme/consultant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Magnetme/consultant/git/refs{/sha}","trees_url":"https://api.github.com/repos/Magnetme/consultant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Magnetme/consultant/statuses/{sha}","languages_url":"https://api.github.com/repos/Magnetme/consultant/languages","stargazers_url":"https://api.github.com/repos/Magnetme/consultant/stargazers","contributors_url":"https://api.github.com/repos/Magnetme/consultant/contributors","subscribers_url":"https://api.github.com/repos/Magnetme/consultant/subscribers","subscription_url":"https://api.github.com/repos/Magnetme/consultant/subscription","commits_url":"https://api.github.com/repos/Magnetme/consultant/commits{/sha}","git_commits_url":"https://api.github.com/repos/Magnetme/consultant/git/commits{/sha}","comments_url":"https://api.github.com/repos/Magnetme/consultant/comments{/number}","issue_comment_url":"https://api.github.com/repos/Magnetme/consultant/issues/comments{/number}","contents_url":"https://api.github.com/repos/Magnetme/consultant/contents/{+path}","compare_url":"https://api.github.com/repos/Magnetme/consultant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Magnetme/consultant/merges","archive_url":"https://api.github.com/repos/Magnetme/consultant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Magnetme/consultant/downloads","issues_url":"https://api.github.com/repos/Magnetme/consultant/issues{/number}","pulls_url":"https://api.github.com/repos/Magnetme/consultant/pulls{/number}","milestones_url":"https://api.github.com/repos/Magnetme/consultant/milestones{/number}","notifications_url":"https://api.github.com/repos/Magnetme/consultant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Magnetme/consultant/labels{/name}","releases_url":"https://api.github.com/repos/Magnetme/consultant/releases{/id}","created_at":"2015-10-21T21:33:15Z","updated_at":"2015-11-10T20:22:53Z","pushed_at":"2015-12-08T09:58:01Z","git_url":"git://github.com/Magnetme/consultant.git","ssh_url":"git@github.com:Magnetme/consultant.git","clone_url":"https://github.com/Magnetme/consultant.git","svn_url":"https://github.com/Magnetme/consultant","homepage":null,"size":41,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"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":1,"default_branch":"master"}},"base":{"label":"Magnetme:master","ref":"master","sha":"a710d2e58ac4153271e56777e0daf4ded543c22a","user":{"login":"Magnetme","id":3966050,"avatar_url":"https://avatars.githubusercontent.com/u/3966050?v=3","gravatar_id":"","url":"https://api.github.com/users/Magnetme","html_url":"https://github.com/Magnetme","followers_url":"https://api.github.com/users/Magnetme/followers","following_url":"https://api.github.com/users/Magnetme/following{/other_user}","gists_url":"https://api.github.com/users/Magnetme/gists{/gist_id}","starred_url":"https://api.github.com/users/Magnetme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Magnetme/subscriptions","organizations_url":"https://api.github.com/users/Magnetme/orgs","repos_url":"https://api.github.com/users/Magnetme/repos","events_url":"https://api.github.com/users/Magnetme/events{/privacy}","received_events_url":"https://api.github.com/users/Magnetme/received_events","type":"Organization","site_admin":false},"repo":{"id":44705844,"name":"consultant","full_name":"Magnetme/consultant","owner":{"login":"Magnetme","id":3966050,"avatar_url":"https://avatars.githubusercontent.com/u/3966050?v=3","gravatar_id":"","url":"https://api.github.com/users/Magnetme","html_url":"https://github.com/Magnetme","followers_url":"https://api.github.com/users/Magnetme/followers","following_url":"https://api.github.com/users/Magnetme/following{/other_user}","gists_url":"https://api.github.com/users/Magnetme/gists{/gist_id}","starred_url":"https://api.github.com/users/Magnetme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Magnetme/subscriptions","organizations_url":"https://api.github.com/users/Magnetme/orgs","repos_url":"https://api.github.com/users/Magnetme/repos","events_url":"https://api.github.com/users/Magnetme/events{/privacy}","received_events_url":"https://api.github.com/users/Magnetme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Magnetme/consultant","description":"A library to retrieve your service's configuration from Consul, and subscribe to changes.","fork":false,"url":"https://api.github.com/repos/Magnetme/consultant","forks_url":"https://api.github.com/repos/Magnetme/consultant/forks","keys_url":"https://api.github.com/repos/Magnetme/consultant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Magnetme/consultant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Magnetme/consultant/teams","hooks_url":"https://api.github.com/repos/Magnetme/consultant/hooks","issue_events_url":"https://api.github.com/repos/Magnetme/consultant/issues/events{/number}","events_url":"https://api.github.com/repos/Magnetme/consultant/events","assignees_url":"https://api.github.com/repos/Magnetme/consultant/assignees{/user}","branches_url":"https://api.github.com/repos/Magnetme/consultant/branches{/branch}","tags_url":"https://api.github.com/repos/Magnetme/consultant/tags","blobs_url":"https://api.github.com/repos/Magnetme/consultant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Magnetme/consultant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Magnetme/consultant/git/refs{/sha}","trees_url":"https://api.github.com/repos/Magnetme/consultant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Magnetme/consultant/statuses/{sha}","languages_url":"https://api.github.com/repos/Magnetme/consultant/languages","stargazers_url":"https://api.github.com/repos/Magnetme/consultant/stargazers","contributors_url":"https://api.github.com/repos/Magnetme/consultant/contributors","subscribers_url":"https://api.github.com/repos/Magnetme/consultant/subscribers","subscription_url":"https://api.github.com/repos/Magnetme/consultant/subscription","commits_url":"https://api.github.com/repos/Magnetme/consultant/commits{/sha}","git_commits_url":"https://api.github.com/repos/Magnetme/consultant/git/commits{/sha}","comments_url":"https://api.github.com/repos/Magnetme/consultant/comments{/number}","issue_comment_url":"https://api.github.com/repos/Magnetme/consultant/issues/comments{/number}","contents_url":"https://api.github.com/repos/Magnetme/consultant/contents/{+path}","compare_url":"https://api.github.com/repos/Magnetme/consultant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Magnetme/consultant/merges","archive_url":"https://api.github.com/repos/Magnetme/consultant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Magnetme/consultant/downloads","issues_url":"https://api.github.com/repos/Magnetme/consultant/issues{/number}","pulls_url":"https://api.github.com/repos/Magnetme/consultant/pulls{/number}","milestones_url":"https://api.github.com/repos/Magnetme/consultant/milestones{/number}","notifications_url":"https://api.github.com/repos/Magnetme/consultant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Magnetme/consultant/labels{/name}","releases_url":"https://api.github.com/repos/Magnetme/consultant/releases{/id}","created_at":"2015-10-21T21:33:15Z","updated_at":"2015-11-10T20:22:53Z","pushed_at":"2015-12-08T09:58:01Z","git_url":"git://github.com/Magnetme/consultant.git","ssh_url":"git@github.com:Magnetme/consultant.git","clone_url":"https://github.com/Magnetme/consultant.git","svn_url":"https://github.com/Magnetme/consultant","homepage":null,"size":41,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Magnetme/consultant/pulls/5"},"html":{"href":"https://github.com/Magnetme/consultant/pull/5"},"issue":{"href":"https://api.github.com/repos/Magnetme/consultant/issues/5"},"comments":{"href":"https://api.github.com/repos/Magnetme/consultant/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/Magnetme/consultant/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/Magnetme/consultant/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Magnetme/consultant/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/Magnetme/consultant/statuses/b543bf3dd23eec0971281faf0668e2a03d9854e6"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"michaeldejong","id":794529,"avatar_url":"https://avatars.githubusercontent.com/u/794529?v=3","gravatar_id":"","url":"https://api.github.com/users/michaeldejong","html_url":"https://github.com/michaeldejong","followers_url":"https://api.github.com/users/michaeldejong/followers","following_url":"https://api.github.com/users/michaeldejong/following{/other_user}","gists_url":"https://api.github.com/users/michaeldejong/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeldejong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeldejong/subscriptions","organizations_url":"https://api.github.com/users/michaeldejong/orgs","repos_url":"https://api.github.com/users/michaeldejong/repos","events_url":"https://api.github.com/users/michaeldejong/events{/privacy}","received_events_url":"https://api.github.com/users/michaeldejong/received_events","type":"User","site_admin":false},"comments":2,"review_comments":1,"commits":1,"additions":223,"deletions":1,"changed_files":5}}