{"action":"created","comment":{"url":"https://api.github.com/repos/dropbox/grouper/pulls/comments/69648093","id":69648093,"diff_hunk":"@@ -256,3 +258,47 @@ def notify_edge_expiration(settings, session, edge):\n         settings=settings,\n         context=email_context,\n     )\n+\n+\n+def notify_nonauditor_flagged(settings, session, edge):\n+    \"\"\"Send notification that a nonauditor in an audited group has had their membership\n+    set to expire.\n+\n+    Handles email notification and audit logging.\n+\n+    Args:\n+        settings (Settings): Grouper Settings object for current run.\n+        session (Session): Object for db session.\n+        edge (GroupEdge): The expiring edge.\n+    \"\"\"\n+    # TODO(rra): Arbitrarily use the first listed owner of the group from which membership expired","path":"grouper/email_util.py","position":null,"original_position":26,"commit_id":"d30c401d64108850b7565b1fa550e6c156e3de99","original_commit_id":"757af6102017553a95158a1413f3640ffa2d26e5","user":{"login":"Acidity","id":2623497,"avatar_url":"https://avatars.githubusercontent.com/u/2623497?v=3","gravatar_id":"","url":"https://api.github.com/users/Acidity","html_url":"https://github.com/Acidity","followers_url":"https://api.github.com/users/Acidity/followers","following_url":"https://api.github.com/users/Acidity/following{/other_user}","gists_url":"https://api.github.com/users/Acidity/gists{/gist_id}","starred_url":"https://api.github.com/users/Acidity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Acidity/subscriptions","organizations_url":"https://api.github.com/users/Acidity/orgs","repos_url":"https://api.github.com/users/Acidity/repos","events_url":"https://api.github.com/users/Acidity/events{/privacy}","received_events_url":"https://api.github.com/users/Acidity/received_events","type":"User","site_admin":false},"body":"I made the user being flagged the actor. What is the right way you're envisioning? The only other solution I can think of would be to have a fake system level user be the actor, but I don't know if that's preferable to having the affected user be the actor, since the system level user could be non-obvious to someone who doesn't know of it's existence.","created_at":"2016-07-05T22:20:00Z","updated_at":"2016-07-05T22:20:00Z","html_url":"https://github.com/dropbox/grouper/pull/229#discussion_r69648093","pull_request_url":"https://api.github.com/repos/dropbox/grouper/pulls/229","_links":{"self":{"href":"https://api.github.com/repos/dropbox/grouper/pulls/comments/69648093"},"html":{"href":"https://github.com/dropbox/grouper/pull/229#discussion_r69648093"},"pull_request":{"href":"https://api.github.com/repos/dropbox/grouper/pulls/229"}}},"pull_request":{"url":"https://api.github.com/repos/dropbox/grouper/pulls/229","id":74708416,"html_url":"https://github.com/dropbox/grouper/pull/229","diff_url":"https://github.com/dropbox/grouper/pull/229.diff","patch_url":"https://github.com/dropbox/grouper/pull/229.patch","issue_url":"https://api.github.com/repos/dropbox/grouper/issues/229","number":229,"state":"open","locked":false,"title":"Detect and remove owners of Audited groups that are not auditors","user":{"login":"Acidity","id":2623497,"avatar_url":"https://avatars.githubusercontent.com/u/2623497?v=3","gravatar_id":"","url":"https://api.github.com/users/Acidity","html_url":"https://github.com/Acidity","followers_url":"https://api.github.com/users/Acidity/followers","following_url":"https://api.github.com/users/Acidity/following{/other_user}","gists_url":"https://api.github.com/users/Acidity/gists{/gist_id}","starred_url":"https://api.github.com/users/Acidity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Acidity/subscriptions","organizations_url":"https://api.github.com/users/Acidity/orgs","repos_url":"https://api.github.com/users/Acidity/repos","events_url":"https://api.github.com/users/Acidity/events{/privacy}","received_events_url":"https://api.github.com/users/Acidity/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-22T00:41:12Z","updated_at":"2016-07-05T22:20:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d47d92c5811abf6d027fb3e04975d650ed7bec35","assignee":{"login":"lfaraone","id":73410,"avatar_url":"https://avatars.githubusercontent.com/u/73410?v=3","gravatar_id":"","url":"https://api.github.com/users/lfaraone","html_url":"https://github.com/lfaraone","followers_url":"https://api.github.com/users/lfaraone/followers","following_url":"https://api.github.com/users/lfaraone/following{/other_user}","gists_url":"https://api.github.com/users/lfaraone/gists{/gist_id}","starred_url":"https://api.github.com/users/lfaraone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfaraone/subscriptions","organizations_url":"https://api.github.com/users/lfaraone/orgs","repos_url":"https://api.github.com/users/lfaraone/repos","events_url":"https://api.github.com/users/lfaraone/events{/privacy}","received_events_url":"https://api.github.com/users/lfaraone/received_events","type":"User","site_admin":false},"assignees":[{"login":"lfaraone","id":73410,"avatar_url":"https://avatars.githubusercontent.com/u/73410?v=3","gravatar_id":"","url":"https://api.github.com/users/lfaraone","html_url":"https://github.com/lfaraone","followers_url":"https://api.github.com/users/lfaraone/followers","following_url":"https://api.github.com/users/lfaraone/following{/other_user}","gists_url":"https://api.github.com/users/lfaraone/gists{/gist_id}","starred_url":"https://api.github.com/users/lfaraone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfaraone/subscriptions","organizations_url":"https://api.github.com/users/lfaraone/orgs","repos_url":"https://api.github.com/users/lfaraone/repos","events_url":"https://api.github.com/users/lfaraone/events{/privacy}","received_events_url":"https://api.github.com/users/lfaraone/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dropbox/grouper/pulls/229/commits","review_comments_url":"https://api.github.com/repos/dropbox/grouper/pulls/229/comments","review_comment_url":"https://api.github.com/repos/dropbox/grouper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dropbox/grouper/issues/229/comments","statuses_url":"https://api.github.com/repos/dropbox/grouper/statuses/d30c401d64108850b7565b1fa550e6c156e3de99","head":{"label":"Acidity:audited_owners_not_auditors","ref":"audited_owners_not_auditors","sha":"d30c401d64108850b7565b1fa550e6c156e3de99","user":{"login":"Acidity","id":2623497,"avatar_url":"https://avatars.githubusercontent.com/u/2623497?v=3","gravatar_id":"","url":"https://api.github.com/users/Acidity","html_url":"https://github.com/Acidity","followers_url":"https://api.github.com/users/Acidity/followers","following_url":"https://api.github.com/users/Acidity/following{/other_user}","gists_url":"https://api.github.com/users/Acidity/gists{/gist_id}","starred_url":"https://api.github.com/users/Acidity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Acidity/subscriptions","organizations_url":"https://api.github.com/users/Acidity/orgs","repos_url":"https://api.github.com/users/Acidity/repos","events_url":"https://api.github.com/users/Acidity/events{/privacy}","received_events_url":"https://api.github.com/users/Acidity/received_events","type":"User","site_admin":false},"repo":{"id":59695670,"name":"grouper","full_name":"Acidity/grouper","owner":{"login":"Acidity","id":2623497,"avatar_url":"https://avatars.githubusercontent.com/u/2623497?v=3","gravatar_id":"","url":"https://api.github.com/users/Acidity","html_url":"https://github.com/Acidity","followers_url":"https://api.github.com/users/Acidity/followers","following_url":"https://api.github.com/users/Acidity/following{/other_user}","gists_url":"https://api.github.com/users/Acidity/gists{/gist_id}","starred_url":"https://api.github.com/users/Acidity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Acidity/subscriptions","organizations_url":"https://api.github.com/users/Acidity/orgs","repos_url":"https://api.github.com/users/Acidity/repos","events_url":"https://api.github.com/users/Acidity/events{/privacy}","received_events_url":"https://api.github.com/users/Acidity/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Acidity/grouper","description":"Group Management Server","fork":true,"url":"https://api.github.com/repos/Acidity/grouper","forks_url":"https://api.github.com/repos/Acidity/grouper/forks","keys_url":"https://api.github.com/repos/Acidity/grouper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Acidity/grouper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Acidity/grouper/teams","hooks_url":"https://api.github.com/repos/Acidity/grouper/hooks","issue_events_url":"https://api.github.com/repos/Acidity/grouper/issues/events{/number}","events_url":"https://api.github.com/repos/Acidity/grouper/events","assignees_url":"https://api.github.com/repos/Acidity/grouper/assignees{/user}","branches_url":"https://api.github.com/repos/Acidity/grouper/branches{/branch}","tags_url":"https://api.github.com/repos/Acidity/grouper/tags","blobs_url":"https://api.github.com/repos/Acidity/grouper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Acidity/grouper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Acidity/grouper/git/refs{/sha}","trees_url":"https://api.github.com/repos/Acidity/grouper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Acidity/grouper/statuses/{sha}","languages_url":"https://api.github.com/repos/Acidity/grouper/languages","stargazers_url":"https://api.github.com/repos/Acidity/grouper/stargazers","contributors_url":"https://api.github.com/repos/Acidity/grouper/contributors","subscribers_url":"https://api.github.com/repos/Acidity/grouper/subscribers","subscription_url":"https://api.github.com/repos/Acidity/grouper/subscription","commits_url":"https://api.github.com/repos/Acidity/grouper/commits{/sha}","git_commits_url":"https://api.github.com/repos/Acidity/grouper/git/commits{/sha}","comments_url":"https://api.github.com/repos/Acidity/grouper/comments{/number}","issue_comment_url":"https://api.github.com/repos/Acidity/grouper/issues/comments{/number}","contents_url":"https://api.github.com/repos/Acidity/grouper/contents/{+path}","compare_url":"https://api.github.com/repos/Acidity/grouper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Acidity/grouper/merges","archive_url":"https://api.github.com/repos/Acidity/grouper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Acidity/grouper/downloads","issues_url":"https://api.github.com/repos/Acidity/grouper/issues{/number}","pulls_url":"https://api.github.com/repos/Acidity/grouper/pulls{/number}","milestones_url":"https://api.github.com/repos/Acidity/grouper/milestones{/number}","notifications_url":"https://api.github.com/repos/Acidity/grouper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Acidity/grouper/labels{/name}","releases_url":"https://api.github.com/repos/Acidity/grouper/releases{/id}","deployments_url":"https://api.github.com/repos/Acidity/grouper/deployments","created_at":"2016-05-25T20:33:35Z","updated_at":"2016-05-25T20:33:36Z","pushed_at":"2016-07-05T22:15:07Z","git_url":"git://github.com/Acidity/grouper.git","ssh_url":"git@github.com:Acidity/grouper.git","clone_url":"https://github.com/Acidity/grouper.git","svn_url":"https://github.com/Acidity/grouper","homepage":null,"size":1016,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"dropbox:master","ref":"master","sha":"4ac260a0d7647386a98b35b87ec140e943fbe6f3","user":{"login":"dropbox","id":559357,"avatar_url":"https://avatars.githubusercontent.com/u/559357?v=3","gravatar_id":"","url":"https://api.github.com/users/dropbox","html_url":"https://github.com/dropbox","followers_url":"https://api.github.com/users/dropbox/followers","following_url":"https://api.github.com/users/dropbox/following{/other_user}","gists_url":"https://api.github.com/users/dropbox/gists{/gist_id}","starred_url":"https://api.github.com/users/dropbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dropbox/subscriptions","organizations_url":"https://api.github.com/users/dropbox/orgs","repos_url":"https://api.github.com/users/dropbox/repos","events_url":"https://api.github.com/users/dropbox/events{/privacy}","received_events_url":"https://api.github.com/users/dropbox/received_events","type":"Organization","site_admin":false},"repo":{"id":23774982,"name":"grouper","full_name":"dropbox/grouper","owner":{"login":"dropbox","id":559357,"avatar_url":"https://avatars.githubusercontent.com/u/559357?v=3","gravatar_id":"","url":"https://api.github.com/users/dropbox","html_url":"https://github.com/dropbox","followers_url":"https://api.github.com/users/dropbox/followers","following_url":"https://api.github.com/users/dropbox/following{/other_user}","gists_url":"https://api.github.com/users/dropbox/gists{/gist_id}","starred_url":"https://api.github.com/users/dropbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dropbox/subscriptions","organizations_url":"https://api.github.com/users/dropbox/orgs","repos_url":"https://api.github.com/users/dropbox/repos","events_url":"https://api.github.com/users/dropbox/events{/privacy}","received_events_url":"https://api.github.com/users/dropbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dropbox/grouper","description":"Group Management Server","fork":false,"url":"https://api.github.com/repos/dropbox/grouper","forks_url":"https://api.github.com/repos/dropbox/grouper/forks","keys_url":"https://api.github.com/repos/dropbox/grouper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dropbox/grouper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dropbox/grouper/teams","hooks_url":"https://api.github.com/repos/dropbox/grouper/hooks","issue_events_url":"https://api.github.com/repos/dropbox/grouper/issues/events{/number}","events_url":"https://api.github.com/repos/dropbox/grouper/events","assignees_url":"https://api.github.com/repos/dropbox/grouper/assignees{/user}","branches_url":"https://api.github.com/repos/dropbox/grouper/branches{/branch}","tags_url":"https://api.github.com/repos/dropbox/grouper/tags","blobs_url":"https://api.github.com/repos/dropbox/grouper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dropbox/grouper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dropbox/grouper/git/refs{/sha}","trees_url":"https://api.github.com/repos/dropbox/grouper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dropbox/grouper/statuses/{sha}","languages_url":"https://api.github.com/repos/dropbox/grouper/languages","stargazers_url":"https://api.github.com/repos/dropbox/grouper/stargazers","contributors_url":"https://api.github.com/repos/dropbox/grouper/contributors","subscribers_url":"https://api.github.com/repos/dropbox/grouper/subscribers","subscription_url":"https://api.github.com/repos/dropbox/grouper/subscription","commits_url":"https://api.github.com/repos/dropbox/grouper/commits{/sha}","git_commits_url":"https://api.github.com/repos/dropbox/grouper/git/commits{/sha}","comments_url":"https://api.github.com/repos/dropbox/grouper/comments{/number}","issue_comment_url":"https://api.github.com/repos/dropbox/grouper/issues/comments{/number}","contents_url":"https://api.github.com/repos/dropbox/grouper/contents/{+path}","compare_url":"https://api.github.com/repos/dropbox/grouper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dropbox/grouper/merges","archive_url":"https://api.github.com/repos/dropbox/grouper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dropbox/grouper/downloads","issues_url":"https://api.github.com/repos/dropbox/grouper/issues{/number}","pulls_url":"https://api.github.com/repos/dropbox/grouper/pulls{/number}","milestones_url":"https://api.github.com/repos/dropbox/grouper/milestones{/number}","notifications_url":"https://api.github.com/repos/dropbox/grouper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dropbox/grouper/labels{/name}","releases_url":"https://api.github.com/repos/dropbox/grouper/releases{/id}","deployments_url":"https://api.github.com/repos/dropbox/grouper/deployments","created_at":"2014-09-08T00:41:17Z","updated_at":"2016-07-01T08:12:20Z","pushed_at":"2016-07-05T22:15:07Z","git_url":"git://github.com/dropbox/grouper.git","ssh_url":"git@github.com:dropbox/grouper.git","clone_url":"https://github.com/dropbox/grouper.git","svn_url":"https://github.com/dropbox/grouper","homepage":null,"size":1236,"stargazers_count":23,"watchers_count":23,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":6,"forks":12,"open_issues":6,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dropbox/grouper/pulls/229"},"html":{"href":"https://github.com/dropbox/grouper/pull/229"},"issue":{"href":"https://api.github.com/repos/dropbox/grouper/issues/229"},"comments":{"href":"https://api.github.com/repos/dropbox/grouper/issues/229/comments"},"review_comments":{"href":"https://api.github.com/repos/dropbox/grouper/pulls/229/comments"},"review_comment":{"href":"https://api.github.com/repos/dropbox/grouper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dropbox/grouper/pulls/229/commits"},"statuses":{"href":"https://api.github.com/repos/dropbox/grouper/statuses/d30c401d64108850b7565b1fa550e6c156e3de99"}}}}
{"actor":{"display_login":"Acidity"}}