{"action":"closed","number":1425,"pull_request":{"url":"https://api.github.com/repos/stympy/faker/pulls/1425","id":224459509,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NDU5NTA5","html_url":"https://github.com/stympy/faker/pull/1425","diff_url":"https://github.com/stympy/faker/pull/1425.diff","patch_url":"https://github.com/stympy/faker/pull/1425.patch","issue_url":"https://api.github.com/repos/stympy/faker/issues/1425","number":1425,"state":"closed","locked":false,"title":"NHS: fix occasional bad numbers","user":{"login":"ChaoticBoredom","id":4335818,"node_id":"MDQ6VXNlcjQzMzU4MTg=","avatar_url":"https://avatars0.githubusercontent.com/u/4335818?v=4","gravatar_id":"","url":"https://api.github.com/users/ChaoticBoredom","html_url":"https://github.com/ChaoticBoredom","followers_url":"https://api.github.com/users/ChaoticBoredom/followers","following_url":"https://api.github.com/users/ChaoticBoredom/following{/other_user}","gists_url":"https://api.github.com/users/ChaoticBoredom/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaoticBoredom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaoticBoredom/subscriptions","organizations_url":"https://api.github.com/users/ChaoticBoredom/orgs","repos_url":"https://api.github.com/users/ChaoticBoredom/repos","events_url":"https://api.github.com/users/ChaoticBoredom/events{/privacy}","received_events_url":"https://api.github.com/users/ChaoticBoredom/received_events","type":"User","site_admin":false},"body":"As I've been working in this repo, I noticed the test for this code was being skipped. On investigation, it was because this generator was not truly accurate, and the test would occasionally fail (as it should have)\r\nThe generator would create a final digit for the generated number, but did not handle the edge cases when this 'check digit' was 10 or 11.\r\nIn the case when the check digit is 10, the entire number is invalid. In this situation, I subtracted one from the generated number which would then be guaranteed to be a valid number.\r\nIn the case when the check digit is 11, it should be returned as a 0, not as 11.\r\nRules were read from [the wikipedia page that was linked in the original PR that introduced this faker.](https://en.wikipedia.org/wiki/NHS_number)\r\nThese changes have tests, and the original test that set me onto this problem is no longer omitted, and should be consistently passing now.","created_at":"2018-10-20T07:56:25Z","updated_at":"2018-10-20T14:29:55Z","closed_at":"2018-10-20T14:29:55Z","merged_at":"2018-10-20T14:29:55Z","merge_commit_sha":"f9782d7680eb7a815eefdb9c10a6d77a32dfed8a","assignee":{"login":"ChaoticBoredom","id":4335818,"node_id":"MDQ6VXNlcjQzMzU4MTg=","avatar_url":"https://avatars0.githubusercontent.com/u/4335818?v=4","gravatar_id":"","url":"https://api.github.com/users/ChaoticBoredom","html_url":"https://github.com/ChaoticBoredom","followers_url":"https://api.github.com/users/ChaoticBoredom/followers","following_url":"https://api.github.com/users/ChaoticBoredom/following{/other_user}","gists_url":"https://api.github.com/users/ChaoticBoredom/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaoticBoredom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaoticBoredom/subscriptions","organizations_url":"https://api.github.com/users/ChaoticBoredom/orgs","repos_url":"https://api.github.com/users/ChaoticBoredom/repos","events_url":"https://api.github.com/users/ChaoticBoredom/events{/privacy}","received_events_url":"https://api.github.com/users/ChaoticBoredom/received_events","type":"User","site_admin":false},"assignees":[{"login":"ChaoticBoredom","id":4335818,"node_id":"MDQ6VXNlcjQzMzU4MTg=","avatar_url":"https://avatars0.githubusercontent.com/u/4335818?v=4","gravatar_id":"","url":"https://api.github.com/users/ChaoticBoredom","html_url":"https://github.com/ChaoticBoredom","followers_url":"https://api.github.com/users/ChaoticBoredom/followers","following_url":"https://api.github.com/users/ChaoticBoredom/following{/other_user}","gists_url":"https://api.github.com/users/ChaoticBoredom/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaoticBoredom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaoticBoredom/subscriptions","organizations_url":"https://api.github.com/users/ChaoticBoredom/orgs","repos_url":"https://api.github.com/users/ChaoticBoredom/repos","events_url":"https://api.github.com/users/ChaoticBoredom/events{/privacy}","received_events_url":"https://api.github.com/users/ChaoticBoredom/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":931129475,"node_id":"MDU6TGFiZWw5MzExMjk0NzU=","url":"https://api.github.com/repos/stympy/faker/labels/Bug/Fixes","name":"Bug/Fixes","color":"d93f0b","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/stympy/faker/pulls/1425/commits","review_comments_url":"https://api.github.com/repos/stympy/faker/pulls/1425/comments","review_comment_url":"https://api.github.com/repos/stympy/faker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stympy/faker/issues/1425/comments","statuses_url":"https://api.github.com/repos/stympy/faker/statuses/0dfb83443f927b6fbdd0dd5858c54c971744cfe6","head":{"label":"ChaoticBoredom:nhs/fix-occasional-bad-numbers","ref":"nhs/fix-occasional-bad-numbers","sha":"0dfb83443f927b6fbdd0dd5858c54c971744cfe6","user":{"login":"ChaoticBoredom","id":4335818,"node_id":"MDQ6VXNlcjQzMzU4MTg=","avatar_url":"https://avatars0.githubusercontent.com/u/4335818?v=4","gravatar_id":"","url":"https://api.github.com/users/ChaoticBoredom","html_url":"https://github.com/ChaoticBoredom","followers_url":"https://api.github.com/users/ChaoticBoredom/followers","following_url":"https://api.github.com/users/ChaoticBoredom/following{/other_user}","gists_url":"https://api.github.com/users/ChaoticBoredom/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaoticBoredom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaoticBoredom/subscriptions","organizations_url":"https://api.github.com/users/ChaoticBoredom/orgs","repos_url":"https://api.github.com/users/ChaoticBoredom/repos","events_url":"https://api.github.com/users/ChaoticBoredom/events{/privacy}","received_events_url":"https://api.github.com/users/ChaoticBoredom/received_events","type":"User","site_admin":false},"repo":{"id":151921592,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE5MjE1OTI=","name":"faker","full_name":"ChaoticBoredom/faker","private":false,"owner":{"login":"ChaoticBoredom","id":4335818,"node_id":"MDQ6VXNlcjQzMzU4MTg=","avatar_url":"https://avatars0.githubusercontent.com/u/4335818?v=4","gravatar_id":"","url":"https://api.github.com/users/ChaoticBoredom","html_url":"https://github.com/ChaoticBoredom","followers_url":"https://api.github.com/users/ChaoticBoredom/followers","following_url":"https://api.github.com/users/ChaoticBoredom/following{/other_user}","gists_url":"https://api.github.com/users/ChaoticBoredom/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaoticBoredom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaoticBoredom/subscriptions","organizations_url":"https://api.github.com/users/ChaoticBoredom/orgs","repos_url":"https://api.github.com/users/ChaoticBoredom/repos","events_url":"https://api.github.com/users/ChaoticBoredom/events{/privacy}","received_events_url":"https://api.github.com/users/ChaoticBoredom/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ChaoticBoredom/faker","description":"A library for generating fake data such as names, addresses, and phone numbers.","fork":true,"url":"https://api.github.com/repos/ChaoticBoredom/faker","forks_url":"https://api.github.com/repos/ChaoticBoredom/faker/forks","keys_url":"https://api.github.com/repos/ChaoticBoredom/faker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChaoticBoredom/faker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChaoticBoredom/faker/teams","hooks_url":"https://api.github.com/repos/ChaoticBoredom/faker/hooks","issue_events_url":"https://api.github.com/repos/ChaoticBoredom/faker/issues/events{/number}","events_url":"https://api.github.com/repos/ChaoticBoredom/faker/events","assignees_url":"https://api.github.com/repos/ChaoticBoredom/faker/assignees{/user}","branches_url":"https://api.github.com/repos/ChaoticBoredom/faker/branches{/branch}","tags_url":"https://api.github.com/repos/ChaoticBoredom/faker/tags","blobs_url":"https://api.github.com/repos/ChaoticBoredom/faker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChaoticBoredom/faker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChaoticBoredom/faker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChaoticBoredom/faker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChaoticBoredom/faker/statuses/{sha}","languages_url":"https://api.github.com/repos/ChaoticBoredom/faker/languages","stargazers_url":"https://api.github.com/repos/ChaoticBoredom/faker/stargazers","contributors_url":"https://api.github.com/repos/ChaoticBoredom/faker/contributors","subscribers_url":"https://api.github.com/repos/ChaoticBoredom/faker/subscribers","subscription_url":"https://api.github.com/repos/ChaoticBoredom/faker/subscription","commits_url":"https://api.github.com/repos/ChaoticBoredom/faker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChaoticBoredom/faker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChaoticBoredom/faker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChaoticBoredom/faker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ChaoticBoredom/faker/contents/{+path}","compare_url":"https://api.github.com/repos/ChaoticBoredom/faker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChaoticBoredom/faker/merges","archive_url":"https://api.github.com/repos/ChaoticBoredom/faker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChaoticBoredom/faker/downloads","issues_url":"https://api.github.com/repos/ChaoticBoredom/faker/issues{/number}","pulls_url":"https://api.github.com/repos/ChaoticBoredom/faker/pulls{/number}","milestones_url":"https://api.github.com/repos/ChaoticBoredom/faker/milestones{/number}","notifications_url":"https://api.github.com/repos/ChaoticBoredom/faker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChaoticBoredom/faker/labels{/name}","releases_url":"https://api.github.com/repos/ChaoticBoredom/faker/releases{/id}","deployments_url":"https://api.github.com/repos/ChaoticBoredom/faker/deployments","created_at":"2018-10-07T08:40:06Z","updated_at":"2018-10-20T04:57:32Z","pushed_at":"2018-10-20T07:51:16Z","git_url":"git://github.com/ChaoticBoredom/faker.git","ssh_url":"git@github.com:ChaoticBoredom/faker.git","clone_url":"https://github.com/ChaoticBoredom/faker.git","svn_url":"https://github.com/ChaoticBoredom/faker","homepage":"","size":4034,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"stympy:master","ref":"master","sha":"32891c4b818848d6a5fc5e586f60c3ca7b1d757a","user":{"login":"stympy","id":1070,"node_id":"MDQ6VXNlcjEwNzA=","avatar_url":"https://avatars3.githubusercontent.com/u/1070?v=4","gravatar_id":"","url":"https://api.github.com/users/stympy","html_url":"https://github.com/stympy","followers_url":"https://api.github.com/users/stympy/followers","following_url":"https://api.github.com/users/stympy/following{/other_user}","gists_url":"https://api.github.com/users/stympy/gists{/gist_id}","starred_url":"https://api.github.com/users/stympy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stympy/subscriptions","organizations_url":"https://api.github.com/users/stympy/orgs","repos_url":"https://api.github.com/users/stympy/repos","events_url":"https://api.github.com/users/stympy/events{/privacy}","received_events_url":"https://api.github.com/users/stympy/received_events","type":"User","site_admin":false},"repo":{"id":96395,"node_id":"MDEwOlJlcG9zaXRvcnk5NjM5NQ==","name":"faker","full_name":"stympy/faker","private":false,"owner":{"login":"stympy","id":1070,"node_id":"MDQ6VXNlcjEwNzA=","avatar_url":"https://avatars3.githubusercontent.com/u/1070?v=4","gravatar_id":"","url":"https://api.github.com/users/stympy","html_url":"https://github.com/stympy","followers_url":"https://api.github.com/users/stympy/followers","following_url":"https://api.github.com/users/stympy/following{/other_user}","gists_url":"https://api.github.com/users/stympy/gists{/gist_id}","starred_url":"https://api.github.com/users/stympy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stympy/subscriptions","organizations_url":"https://api.github.com/users/stympy/orgs","repos_url":"https://api.github.com/users/stympy/repos","events_url":"https://api.github.com/users/stympy/events{/privacy}","received_events_url":"https://api.github.com/users/stympy/received_events","type":"User","site_admin":false},"html_url":"https://github.com/stympy/faker","description":"A library for generating fake data such as names, addresses, and phone numbers.","fork":false,"url":"https://api.github.com/repos/stympy/faker","forks_url":"https://api.github.com/repos/stympy/faker/forks","keys_url":"https://api.github.com/repos/stympy/faker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stympy/faker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stympy/faker/teams","hooks_url":"https://api.github.com/repos/stympy/faker/hooks","issue_events_url":"https://api.github.com/repos/stympy/faker/issues/events{/number}","events_url":"https://api.github.com/repos/stympy/faker/events","assignees_url":"https://api.github.com/repos/stympy/faker/assignees{/user}","branches_url":"https://api.github.com/repos/stympy/faker/branches{/branch}","tags_url":"https://api.github.com/repos/stympy/faker/tags","blobs_url":"https://api.github.com/repos/stympy/faker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stympy/faker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stympy/faker/git/refs{/sha}","trees_url":"https://api.github.com/repos/stympy/faker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stympy/faker/statuses/{sha}","languages_url":"https://api.github.com/repos/stympy/faker/languages","stargazers_url":"https://api.github.com/repos/stympy/faker/stargazers","contributors_url":"https://api.github.com/repos/stympy/faker/contributors","subscribers_url":"https://api.github.com/repos/stympy/faker/subscribers","subscription_url":"https://api.github.com/repos/stympy/faker/subscription","commits_url":"https://api.github.com/repos/stympy/faker/commits{/sha}","git_commits_url":"https://api.github.com/repos/stympy/faker/git/commits{/sha}","comments_url":"https://api.github.com/repos/stympy/faker/comments{/number}","issue_comment_url":"https://api.github.com/repos/stympy/faker/issues/comments{/number}","contents_url":"https://api.github.com/repos/stympy/faker/contents/{+path}","compare_url":"https://api.github.com/repos/stympy/faker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stympy/faker/merges","archive_url":"https://api.github.com/repos/stympy/faker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stympy/faker/downloads","issues_url":"https://api.github.com/repos/stympy/faker/issues{/number}","pulls_url":"https://api.github.com/repos/stympy/faker/pulls{/number}","milestones_url":"https://api.github.com/repos/stympy/faker/milestones{/number}","notifications_url":"https://api.github.com/repos/stympy/faker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stympy/faker/labels{/name}","releases_url":"https://api.github.com/repos/stympy/faker/releases{/id}","deployments_url":"https://api.github.com/repos/stympy/faker/deployments","created_at":"2008-12-24T17:20:37Z","updated_at":"2018-10-20T04:18:58Z","pushed_at":"2018-10-20T14:29:55Z","git_url":"git://github.com/stympy/faker.git","ssh_url":"git@github.com:stympy/faker.git","clone_url":"https://github.com/stympy/faker.git","svn_url":"https://github.com/stympy/faker","homepage":"","size":3982,"stargazers_count":7055,"watchers_count":7055,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1802,"mirror_url":null,"archived":false,"open_issues_count":51,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1802,"open_issues":51,"watchers":7055,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stympy/faker/pulls/1425"},"html":{"href":"https://github.com/stympy/faker/pull/1425"},"issue":{"href":"https://api.github.com/repos/stympy/faker/issues/1425"},"comments":{"href":"https://api.github.com/repos/stympy/faker/issues/1425/comments"},"review_comments":{"href":"https://api.github.com/repos/stympy/faker/pulls/1425/comments"},"review_comment":{"href":"https://api.github.com/repos/stympy/faker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stympy/faker/pulls/1425/commits"},"statuses":{"href":"https://api.github.com/repos/stympy/faker/statuses/0dfb83443f927b6fbdd0dd5858c54c971744cfe6"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"vbrazo","id":1292556,"node_id":"MDQ6VXNlcjEyOTI1NTY=","avatar_url":"https://avatars0.githubusercontent.com/u/1292556?v=4","gravatar_id":"","url":"https://api.github.com/users/vbrazo","html_url":"https://github.com/vbrazo","followers_url":"https://api.github.com/users/vbrazo/followers","following_url":"https://api.github.com/users/vbrazo/following{/other_user}","gists_url":"https://api.github.com/users/vbrazo/gists{/gist_id}","starred_url":"https://api.github.com/users/vbrazo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbrazo/subscriptions","organizations_url":"https://api.github.com/users/vbrazo/orgs","repos_url":"https://api.github.com/users/vbrazo/repos","events_url":"https://api.github.com/users/vbrazo/events{/privacy}","received_events_url":"https://api.github.com/users/vbrazo/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":21,"deletions":4,"changed_files":2}}
{"actor":{"display_login":"vbrazo"}}