{"action":"created","comment":{"url":"https://api.github.com/repos/gentoo/gentoo-keys/pulls/comments/74599461","id":74599461,"diff_hunk":"@@ -6,6 +6,8 @@\n # keyserver: server to use to obtain the keys from\n keyserver: pool.sks-keyservers.net\n \n+#Days limit for keys nearing expiry\n+days_limit = 340","path":"gkeys/etc/gkeys.conf","position":5,"original_position":5,"commit_id":"d66caac5fc17330b65c9a8c8e1cda39c4fc43cd6","original_commit_id":"d66caac5fc17330b65c9a8c8e1cda39c4fc43cd6","user":{"login":"dastergon","id":1192342,"avatar_url":"https://avatars.githubusercontent.com/u/1192342?v=3","gravatar_id":"","url":"https://api.github.com/users/dastergon","html_url":"https://github.com/dastergon","followers_url":"https://api.github.com/users/dastergon/followers","following_url":"https://api.github.com/users/dastergon/following{/other_user}","gists_url":"https://api.github.com/users/dastergon/gists{/gist_id}","starred_url":"https://api.github.com/users/dastergon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dastergon/subscriptions","organizations_url":"https://api.github.com/users/dastergon/orgs","repos_url":"https://api.github.com/users/dastergon/repos","events_url":"https://api.github.com/users/dastergon/events{/privacy}","received_events_url":"https://api.github.com/users/dastergon/received_events","type":"User","site_admin":false},"body":"you pushed it by mistake\r\n","created_at":"2016-08-12T14:25:47Z","updated_at":"2016-08-12T14:25:47Z","html_url":"https://github.com/gentoo/gentoo-keys/pull/51#discussion_r74599461","pull_request_url":"https://api.github.com/repos/gentoo/gentoo-keys/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/gentoo/gentoo-keys/pulls/comments/74599461"},"html":{"href":"https://github.com/gentoo/gentoo-keys/pull/51#discussion_r74599461"},"pull_request":{"href":"https://api.github.com/repos/gentoo/gentoo-keys/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/gentoo/gentoo-keys/pulls/51","id":80815398,"html_url":"https://github.com/gentoo/gentoo-keys/pull/51","diff_url":"https://github.com/gentoo/gentoo-keys/pull/51.diff","patch_url":"https://github.com/gentoo/gentoo-keys/pull/51.patch","issue_url":"https://api.github.com/repos/gentoo/gentoo-keys/issues/51","number":51,"state":"open","locked":false,"title":"Email reminders for expiry","user":{"login":"aeroniero33","id":5175537,"avatar_url":"https://avatars.githubusercontent.com/u/5175537?v=3","gravatar_id":"","url":"https://api.github.com/users/aeroniero33","html_url":"https://github.com/aeroniero33","followers_url":"https://api.github.com/users/aeroniero33/followers","following_url":"https://api.github.com/users/aeroniero33/following{/other_user}","gists_url":"https://api.github.com/users/aeroniero33/gists{/gist_id}","starred_url":"https://api.github.com/users/aeroniero33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeroniero33/subscriptions","organizations_url":"https://api.github.com/users/aeroniero33/orgs","repos_url":"https://api.github.com/users/aeroniero33/repos","events_url":"https://api.github.com/users/aeroniero33/events{/privacy}","received_events_url":"https://api.github.com/users/aeroniero33/received_events","type":"User","site_admin":false},"body":"I created a script which I integrated in `spec-check` that sends email reminders to users whose keys have expired or will expire recently. In order to do this:\r\n\r\nI added an `args` parameter called `--email` in `base.py` to be given to spec-check in order for the script to run.\r\nI added a template for login credentials and a commented days limit value in `gkeys.conf`.\r\nI added a 180 default value for the days limit in `config.py`.\r\nI added a few more lines of code in `actions.py` that if `args.email` == `expiry` it logs in to the email server using the config credentials, checks every key if they pass the days limit, finds the user's email, compiles a message that includes all necessary information and sends the message to the user's email.\r\nI created a new file called `mail.py` that handles the email login and the email sending.\r\n\r\nTo test I used, `gkeys -c gkeys/etc/gkeys.conf -C gentoo-devs --email expiry` with my email credentials edited in the config file and my other email instead of the user's email and got the expected result which was an email which includes information, resources for help and the `Spec-Check` tuple print.\r\n","created_at":"2016-08-10T15:30:05Z","updated_at":"2016-08-12T14:25:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce440aceea439a54cf520a9f0a67889fd8e93f7a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/gentoo/gentoo-keys/pulls/51/commits","review_comments_url":"https://api.github.com/repos/gentoo/gentoo-keys/pulls/51/comments","review_comment_url":"https://api.github.com/repos/gentoo/gentoo-keys/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gentoo/gentoo-keys/issues/51/comments","statuses_url":"https://api.github.com/repos/gentoo/gentoo-keys/statuses/d66caac5fc17330b65c9a8c8e1cda39c4fc43cd6","head":{"label":"aeroniero33:email-reminders","ref":"email-reminders","sha":"d66caac5fc17330b65c9a8c8e1cda39c4fc43cd6","user":{"login":"aeroniero33","id":5175537,"avatar_url":"https://avatars.githubusercontent.com/u/5175537?v=3","gravatar_id":"","url":"https://api.github.com/users/aeroniero33","html_url":"https://github.com/aeroniero33","followers_url":"https://api.github.com/users/aeroniero33/followers","following_url":"https://api.github.com/users/aeroniero33/following{/other_user}","gists_url":"https://api.github.com/users/aeroniero33/gists{/gist_id}","starred_url":"https://api.github.com/users/aeroniero33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeroniero33/subscriptions","organizations_url":"https://api.github.com/users/aeroniero33/orgs","repos_url":"https://api.github.com/users/aeroniero33/repos","events_url":"https://api.github.com/users/aeroniero33/events{/privacy}","received_events_url":"https://api.github.com/users/aeroniero33/received_events","type":"User","site_admin":false},"repo":{"id":64665818,"name":"gentoo-keys","full_name":"aeroniero33/gentoo-keys","owner":{"login":"aeroniero33","id":5175537,"avatar_url":"https://avatars.githubusercontent.com/u/5175537?v=3","gravatar_id":"","url":"https://api.github.com/users/aeroniero33","html_url":"https://github.com/aeroniero33","followers_url":"https://api.github.com/users/aeroniero33/followers","following_url":"https://api.github.com/users/aeroniero33/following{/other_user}","gists_url":"https://api.github.com/users/aeroniero33/gists{/gist_id}","starred_url":"https://api.github.com/users/aeroniero33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeroniero33/subscriptions","organizations_url":"https://api.github.com/users/aeroniero33/orgs","repos_url":"https://api.github.com/users/aeroniero33/repos","events_url":"https://api.github.com/users/aeroniero33/events{/privacy}","received_events_url":"https://api.github.com/users/aeroniero33/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aeroniero33/gentoo-keys","description":"OpenPGP Key management tool for Gentoo projects","fork":true,"url":"https://api.github.com/repos/aeroniero33/gentoo-keys","forks_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/forks","keys_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/teams","hooks_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/hooks","issue_events_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/issues/events{/number}","events_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/events","assignees_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/assignees{/user}","branches_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/branches{/branch}","tags_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/tags","blobs_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/git/refs{/sha}","trees_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/statuses/{sha}","languages_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/languages","stargazers_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/stargazers","contributors_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/contributors","subscribers_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/subscribers","subscription_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/subscription","commits_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/commits{/sha}","git_commits_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/git/commits{/sha}","comments_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/comments{/number}","issue_comment_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/issues/comments{/number}","contents_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/contents/{+path}","compare_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/merges","archive_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/downloads","issues_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/issues{/number}","pulls_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/pulls{/number}","milestones_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/milestones{/number}","notifications_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/labels{/name}","releases_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/releases{/id}","deployments_url":"https://api.github.com/repos/aeroniero33/gentoo-keys/deployments","created_at":"2016-08-01T12:42:17Z","updated_at":"2016-08-01T12:42:19Z","pushed_at":"2016-08-12T13:54:17Z","git_url":"git://github.com/aeroniero33/gentoo-keys.git","ssh_url":"git@github.com:aeroniero33/gentoo-keys.git","clone_url":"https://github.com/aeroniero33/gentoo-keys.git","svn_url":"https://github.com/aeroniero33/gentoo-keys","homepage":"https://wiki.gentoo.org/wiki/Project:Gentoo-keys","size":551,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"gentoo:master","ref":"master","sha":"423c3bf0b3ae993e15886858aede0a94372b55fd","user":{"login":"gentoo","id":52242,"avatar_url":"https://avatars.githubusercontent.com/u/52242?v=3","gravatar_id":"","url":"https://api.github.com/users/gentoo","html_url":"https://github.com/gentoo","followers_url":"https://api.github.com/users/gentoo/followers","following_url":"https://api.github.com/users/gentoo/following{/other_user}","gists_url":"https://api.github.com/users/gentoo/gists{/gist_id}","starred_url":"https://api.github.com/users/gentoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gentoo/subscriptions","organizations_url":"https://api.github.com/users/gentoo/orgs","repos_url":"https://api.github.com/users/gentoo/repos","events_url":"https://api.github.com/users/gentoo/events{/privacy}","received_events_url":"https://api.github.com/users/gentoo/received_events","type":"Organization","site_admin":false},"repo":{"id":19853787,"name":"gentoo-keys","full_name":"gentoo/gentoo-keys","owner":{"login":"gentoo","id":52242,"avatar_url":"https://avatars.githubusercontent.com/u/52242?v=3","gravatar_id":"","url":"https://api.github.com/users/gentoo","html_url":"https://github.com/gentoo","followers_url":"https://api.github.com/users/gentoo/followers","following_url":"https://api.github.com/users/gentoo/following{/other_user}","gists_url":"https://api.github.com/users/gentoo/gists{/gist_id}","starred_url":"https://api.github.com/users/gentoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gentoo/subscriptions","organizations_url":"https://api.github.com/users/gentoo/orgs","repos_url":"https://api.github.com/users/gentoo/repos","events_url":"https://api.github.com/users/gentoo/events{/privacy}","received_events_url":"https://api.github.com/users/gentoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gentoo/gentoo-keys","description":"OpenPGP Key management tool for Gentoo projects","fork":false,"url":"https://api.github.com/repos/gentoo/gentoo-keys","forks_url":"https://api.github.com/repos/gentoo/gentoo-keys/forks","keys_url":"https://api.github.com/repos/gentoo/gentoo-keys/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gentoo/gentoo-keys/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gentoo/gentoo-keys/teams","hooks_url":"https://api.github.com/repos/gentoo/gentoo-keys/hooks","issue_events_url":"https://api.github.com/repos/gentoo/gentoo-keys/issues/events{/number}","events_url":"https://api.github.com/repos/gentoo/gentoo-keys/events","assignees_url":"https://api.github.com/repos/gentoo/gentoo-keys/assignees{/user}","branches_url":"https://api.github.com/repos/gentoo/gentoo-keys/branches{/branch}","tags_url":"https://api.github.com/repos/gentoo/gentoo-keys/tags","blobs_url":"https://api.github.com/repos/gentoo/gentoo-keys/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gentoo/gentoo-keys/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gentoo/gentoo-keys/git/refs{/sha}","trees_url":"https://api.github.com/repos/gentoo/gentoo-keys/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gentoo/gentoo-keys/statuses/{sha}","languages_url":"https://api.github.com/repos/gentoo/gentoo-keys/languages","stargazers_url":"https://api.github.com/repos/gentoo/gentoo-keys/stargazers","contributors_url":"https://api.github.com/repos/gentoo/gentoo-keys/contributors","subscribers_url":"https://api.github.com/repos/gentoo/gentoo-keys/subscribers","subscription_url":"https://api.github.com/repos/gentoo/gentoo-keys/subscription","commits_url":"https://api.github.com/repos/gentoo/gentoo-keys/commits{/sha}","git_commits_url":"https://api.github.com/repos/gentoo/gentoo-keys/git/commits{/sha}","comments_url":"https://api.github.com/repos/gentoo/gentoo-keys/comments{/number}","issue_comment_url":"https://api.github.com/repos/gentoo/gentoo-keys/issues/comments{/number}","contents_url":"https://api.github.com/repos/gentoo/gentoo-keys/contents/{+path}","compare_url":"https://api.github.com/repos/gentoo/gentoo-keys/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gentoo/gentoo-keys/merges","archive_url":"https://api.github.com/repos/gentoo/gentoo-keys/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gentoo/gentoo-keys/downloads","issues_url":"https://api.github.com/repos/gentoo/gentoo-keys/issues{/number}","pulls_url":"https://api.github.com/repos/gentoo/gentoo-keys/pulls{/number}","milestones_url":"https://api.github.com/repos/gentoo/gentoo-keys/milestones{/number}","notifications_url":"https://api.github.com/repos/gentoo/gentoo-keys/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gentoo/gentoo-keys/labels{/name}","releases_url":"https://api.github.com/repos/gentoo/gentoo-keys/releases{/id}","deployments_url":"https://api.github.com/repos/gentoo/gentoo-keys/deployments","created_at":"2014-05-16T11:09:15Z","updated_at":"2016-05-23T22:34:40Z","pushed_at":"2016-08-12T13:54:17Z","git_url":"git://github.com/gentoo/gentoo-keys.git","ssh_url":"git@github.com:gentoo/gentoo-keys.git","clone_url":"https://github.com/gentoo/gentoo-keys.git","svn_url":"https://github.com/gentoo/gentoo-keys","homepage":"https://wiki.gentoo.org/wiki/Project:Gentoo-keys","size":594,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gentoo/gentoo-keys/pulls/51"},"html":{"href":"https://github.com/gentoo/gentoo-keys/pull/51"},"issue":{"href":"https://api.github.com/repos/gentoo/gentoo-keys/issues/51"},"comments":{"href":"https://api.github.com/repos/gentoo/gentoo-keys/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/gentoo/gentoo-keys/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/gentoo/gentoo-keys/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gentoo/gentoo-keys/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/gentoo/gentoo-keys/statuses/d66caac5fc17330b65c9a8c8e1cda39c4fc43cd6"}}}}
{"actor":{"display_login":"dastergon"}}