{"action":"created","comment":{"url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/pulls/comments/34993818","id":34993818,"diff_hunk":"@@ -512,3 +603,44 @@ def synchronize_organisations():\n             org_instance.save()\n \n     return (new_orgs, updated_orgs)\n+\n+\n+def get_billable_organisation(user):\n+    \"\"\"\n+    Retrieve the organisation for which the given user is a \"billing\" user: this\n+    organisation is subsequently this users' 'billable organisation'\n+    \"\"\"\n+    billable_org = get_billable_org_from_database(user)\n+\n+    if billable_org:","path":"lizard_auth_client/client.py","position":203,"original_position":203,"commit_id":"401edd16b4c30ebcb5985fecd2b719001775128d","original_commit_id":"401edd16b4c30ebcb5985fecd2b719001775128d","user":{"login":"remcogerlich","id":294656,"avatar_url":"https://avatars.githubusercontent.com/u/294656?v=3","gravatar_id":"","url":"https://api.github.com/users/remcogerlich","html_url":"https://github.com/remcogerlich","followers_url":"https://api.github.com/users/remcogerlich/followers","following_url":"https://api.github.com/users/remcogerlich/following{/other_user}","gists_url":"https://api.github.com/users/remcogerlich/gists{/gist_id}","starred_url":"https://api.github.com/users/remcogerlich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remcogerlich/subscriptions","organizations_url":"https://api.github.com/users/remcogerlich/orgs","repos_url":"https://api.github.com/users/remcogerlich/repos","events_url":"https://api.github.com/users/remcogerlich/events{/privacy}","received_events_url":"https://api.github.com/users/remcogerlich/received_events","type":"User","site_admin":false},"body":"Hij raised een Exception als hij niet bestaat, op het moment, dus een if: werkt niet. Moeten ook testjes voor komen.","created_at":"2015-07-20T13:29:37Z","updated_at":"2015-07-20T13:29:37Z","html_url":"https://github.com/lizardsystem/lizard-auth-client/pull/20#discussion_r34993818","pull_request_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/lizardsystem/lizard-auth-client/pulls/comments/34993818"},"html":{"href":"https://github.com/lizardsystem/lizard-auth-client/pull/20#discussion_r34993818"},"pull_request":{"href":"https://api.github.com/repos/lizardsystem/lizard-auth-client/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/pulls/20","id":39362699,"html_url":"https://github.com/lizardsystem/lizard-auth-client/pull/20","diff_url":"https://github.com/lizardsystem/lizard-auth-client/pull/20.diff","patch_url":"https://github.com/lizardsystem/lizard-auth-client/pull/20.patch","issue_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/issues/20","number":20,"state":"open","locked":false,"title":"[DOING] Dirk get billable orgs client","user":{"login":"d-weeteling","id":7764718,"avatar_url":"https://avatars.githubusercontent.com/u/7764718?v=3","gravatar_id":"","url":"https://api.github.com/users/d-weeteling","html_url":"https://github.com/d-weeteling","followers_url":"https://api.github.com/users/d-weeteling/followers","following_url":"https://api.github.com/users/d-weeteling/following{/other_user}","gists_url":"https://api.github.com/users/d-weeteling/gists{/gist_id}","starred_url":"https://api.github.com/users/d-weeteling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d-weeteling/subscriptions","organizations_url":"https://api.github.com/users/d-weeteling/orgs","repos_url":"https://api.github.com/users/d-weeteling/repos","events_url":"https://api.github.com/users/d-weeteling/events{/privacy}","received_events_url":"https://api.github.com/users/d-weeteling/received_events","type":"User","site_admin":false},"body":"x-reference: https://github.com/lizardsystem/lizard-auth-server/pull/15","created_at":"2015-07-07T12:07:45Z","updated_at":"2015-07-20T13:29:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4928cf9eef07754a6fefd704149ea251dcb9926","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/pulls/20/commits","review_comments_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/pulls/20/comments","review_comment_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/issues/20/comments","statuses_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/statuses/401edd16b4c30ebcb5985fecd2b719001775128d","head":{"label":"lizardsystem:dirk_get_billable_orgs_CLIENT","ref":"dirk_get_billable_orgs_CLIENT","sha":"401edd16b4c30ebcb5985fecd2b719001775128d","user":{"login":"lizardsystem","id":1029862,"avatar_url":"https://avatars.githubusercontent.com/u/1029862?v=3","gravatar_id":"","url":"https://api.github.com/users/lizardsystem","html_url":"https://github.com/lizardsystem","followers_url":"https://api.github.com/users/lizardsystem/followers","following_url":"https://api.github.com/users/lizardsystem/following{/other_user}","gists_url":"https://api.github.com/users/lizardsystem/gists{/gist_id}","starred_url":"https://api.github.com/users/lizardsystem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizardsystem/subscriptions","organizations_url":"https://api.github.com/users/lizardsystem/orgs","repos_url":"https://api.github.com/users/lizardsystem/repos","events_url":"https://api.github.com/users/lizardsystem/events{/privacy}","received_events_url":"https://api.github.com/users/lizardsystem/received_events","type":"Organization","site_admin":false},"repo":{"id":7111556,"name":"lizard-auth-client","full_name":"lizardsystem/lizard-auth-client","owner":{"login":"lizardsystem","id":1029862,"avatar_url":"https://avatars.githubusercontent.com/u/1029862?v=3","gravatar_id":"","url":"https://api.github.com/users/lizardsystem","html_url":"https://github.com/lizardsystem","followers_url":"https://api.github.com/users/lizardsystem/followers","following_url":"https://api.github.com/users/lizardsystem/following{/other_user}","gists_url":"https://api.github.com/users/lizardsystem/gists{/gist_id}","starred_url":"https://api.github.com/users/lizardsystem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizardsystem/subscriptions","organizations_url":"https://api.github.com/users/lizardsystem/orgs","repos_url":"https://api.github.com/users/lizardsystem/repos","events_url":"https://api.github.com/users/lizardsystem/events{/privacy}","received_events_url":"https://api.github.com/users/lizardsystem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lizardsystem/lizard-auth-client","description":"A client for lizard-auth-server","fork":false,"url":"https://api.github.com/repos/lizardsystem/lizard-auth-client","forks_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/forks","keys_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/teams","hooks_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/hooks","issue_events_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/issues/events{/number}","events_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/events","assignees_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/assignees{/user}","branches_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/branches{/branch}","tags_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/tags","blobs_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/statuses/{sha}","languages_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/languages","stargazers_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/stargazers","contributors_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/contributors","subscribers_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/subscribers","subscription_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/subscription","commits_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/contents/{+path}","compare_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/merges","archive_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/downloads","issues_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/issues{/number}","pulls_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/pulls{/number}","milestones_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/milestones{/number}","notifications_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/labels{/name}","releases_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/releases{/id}","created_at":"2012-12-11T12:42:51Z","updated_at":"2015-05-06T09:18:40Z","pushed_at":"2015-07-20T13:24:08Z","git_url":"git://github.com/lizardsystem/lizard-auth-client.git","ssh_url":"git@github.com:lizardsystem/lizard-auth-client.git","clone_url":"https://github.com/lizardsystem/lizard-auth-client.git","svn_url":"https://github.com/lizardsystem/lizard-auth-client","homepage":"","size":832,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"lizardsystem:master","ref":"master","sha":"2fabbbe15ab262194a081b205b463b94aadd43d5","user":{"login":"lizardsystem","id":1029862,"avatar_url":"https://avatars.githubusercontent.com/u/1029862?v=3","gravatar_id":"","url":"https://api.github.com/users/lizardsystem","html_url":"https://github.com/lizardsystem","followers_url":"https://api.github.com/users/lizardsystem/followers","following_url":"https://api.github.com/users/lizardsystem/following{/other_user}","gists_url":"https://api.github.com/users/lizardsystem/gists{/gist_id}","starred_url":"https://api.github.com/users/lizardsystem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizardsystem/subscriptions","organizations_url":"https://api.github.com/users/lizardsystem/orgs","repos_url":"https://api.github.com/users/lizardsystem/repos","events_url":"https://api.github.com/users/lizardsystem/events{/privacy}","received_events_url":"https://api.github.com/users/lizardsystem/received_events","type":"Organization","site_admin":false},"repo":{"id":7111556,"name":"lizard-auth-client","full_name":"lizardsystem/lizard-auth-client","owner":{"login":"lizardsystem","id":1029862,"avatar_url":"https://avatars.githubusercontent.com/u/1029862?v=3","gravatar_id":"","url":"https://api.github.com/users/lizardsystem","html_url":"https://github.com/lizardsystem","followers_url":"https://api.github.com/users/lizardsystem/followers","following_url":"https://api.github.com/users/lizardsystem/following{/other_user}","gists_url":"https://api.github.com/users/lizardsystem/gists{/gist_id}","starred_url":"https://api.github.com/users/lizardsystem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizardsystem/subscriptions","organizations_url":"https://api.github.com/users/lizardsystem/orgs","repos_url":"https://api.github.com/users/lizardsystem/repos","events_url":"https://api.github.com/users/lizardsystem/events{/privacy}","received_events_url":"https://api.github.com/users/lizardsystem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lizardsystem/lizard-auth-client","description":"A client for lizard-auth-server","fork":false,"url":"https://api.github.com/repos/lizardsystem/lizard-auth-client","forks_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/forks","keys_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/teams","hooks_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/hooks","issue_events_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/issues/events{/number}","events_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/events","assignees_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/assignees{/user}","branches_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/branches{/branch}","tags_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/tags","blobs_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/statuses/{sha}","languages_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/languages","stargazers_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/stargazers","contributors_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/contributors","subscribers_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/subscribers","subscription_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/subscription","commits_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/contents/{+path}","compare_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/merges","archive_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/downloads","issues_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/issues{/number}","pulls_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/pulls{/number}","milestones_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/milestones{/number}","notifications_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/labels{/name}","releases_url":"https://api.github.com/repos/lizardsystem/lizard-auth-client/releases{/id}","created_at":"2012-12-11T12:42:51Z","updated_at":"2015-05-06T09:18:40Z","pushed_at":"2015-07-20T13:24:08Z","git_url":"git://github.com/lizardsystem/lizard-auth-client.git","ssh_url":"git@github.com:lizardsystem/lizard-auth-client.git","clone_url":"https://github.com/lizardsystem/lizard-auth-client.git","svn_url":"https://github.com/lizardsystem/lizard-auth-client","homepage":"","size":832,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lizardsystem/lizard-auth-client/pulls/20"},"html":{"href":"https://github.com/lizardsystem/lizard-auth-client/pull/20"},"issue":{"href":"https://api.github.com/repos/lizardsystem/lizard-auth-client/issues/20"},"comments":{"href":"https://api.github.com/repos/lizardsystem/lizard-auth-client/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/lizardsystem/lizard-auth-client/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/lizardsystem/lizard-auth-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lizardsystem/lizard-auth-client/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/lizardsystem/lizard-auth-client/statuses/401edd16b4c30ebcb5985fecd2b719001775128d"}}}}