{"action":"created","comment":{"url":"https://api.github.com/repos/docker/notary/pulls/comments/67067980","id":67067980,"diff_hunk":"@@ -190,9 +190,32 @@ func applyRootRoleChange(repo *tuf.Repo, c changelist.Change) error {\n \treturn nil\n }\n \n-func nearExpiry(r *data.SignedRoot) bool {\n+func nearExpiry(r data.SignedCommon) bool {\n \tplus6mo := time.Now().AddDate(0, 6, 0)\n-\treturn r.Signed.Expires.Before(plus6mo)\n+\treturn r.Expires.Before(plus6mo)\n+}\n+\n+func rolesNearExpiry(r *tuf.Repo) error {\n+\t//get every role and its respective signed common and call nearExpiry on it\n+\t//Root check\n+\t//Reset levels to display warnings through logrus\n+\tlogrus.SetLevel(logrus.WarnLevel)","path":"client/helpers.go","position":15,"original_position":15,"commit_id":"490b9c72f4b936983953f7d1f7bfd05875370582","original_commit_id":"490b9c72f4b936983953f7d1f7bfd05875370582","user":{"login":"avaid96","id":9308841,"avatar_url":"https://avatars.githubusercontent.com/u/9308841?v=3","gravatar_id":"","url":"https://api.github.com/users/avaid96","html_url":"https://github.com/avaid96","followers_url":"https://api.github.com/users/avaid96/followers","following_url":"https://api.github.com/users/avaid96/following{/other_user}","gists_url":"https://api.github.com/users/avaid96/gists{/gist_id}","starred_url":"https://api.github.com/users/avaid96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avaid96/subscriptions","organizations_url":"https://api.github.com/users/avaid96/orgs","repos_url":"https://api.github.com/users/avaid96/repos","events_url":"https://api.github.com/users/avaid96/events{/privacy}","received_events_url":"https://api.github.com/users/avaid96/received_events","type":"User","site_admin":false},"body":"Sounds good, editing the commit","created_at":"2016-06-14T22:16:32Z","updated_at":"2016-06-14T22:16:32Z","html_url":"https://github.com/docker/notary/pull/786#discussion_r67067980","pull_request_url":"https://api.github.com/repos/docker/notary/pulls/786","_links":{"self":{"href":"https://api.github.com/repos/docker/notary/pulls/comments/67067980"},"html":{"href":"https://github.com/docker/notary/pull/786#discussion_r67067980"},"pull_request":{"href":"https://api.github.com/repos/docker/notary/pulls/786"}}},"pull_request":{"url":"https://api.github.com/repos/docker/notary/pulls/786","id":73788781,"html_url":"https://github.com/docker/notary/pull/786","diff_url":"https://github.com/docker/notary/pull/786.diff","patch_url":"https://github.com/docker/notary/pull/786.patch","issue_url":"https://api.github.com/repos/docker/notary/issues/786","number":786,"state":"open","locked":false,"title":"Nearexpirywarnings for re-signing roles on read or write","user":{"login":"avaid96","id":9308841,"avatar_url":"https://avatars.githubusercontent.com/u/9308841?v=3","gravatar_id":"","url":"https://api.github.com/users/avaid96","html_url":"https://github.com/avaid96","followers_url":"https://api.github.com/users/avaid96/followers","following_url":"https://api.github.com/users/avaid96/following{/other_user}","gists_url":"https://api.github.com/users/avaid96/gists{/gist_id}","starred_url":"https://api.github.com/users/avaid96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avaid96/subscriptions","organizations_url":"https://api.github.com/users/avaid96/orgs","repos_url":"https://api.github.com/users/avaid96/repos","events_url":"https://api.github.com/users/avaid96/events{/privacy}","received_events_url":"https://api.github.com/users/avaid96/received_events","type":"User","site_admin":false},"body":"Warnings are now output on read and write actions. Should indicate which role will be expiring soon and will need to be re-signed.\r\nAlso deleted an unused function in testutils- AddTarget\r\ncloses #733 ","created_at":"2016-06-14T18:21:54Z","updated_at":"2016-06-14T22:16:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e3e130cc296ec8aa25a1dae2842c90e95485613e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/notary/pulls/786/commits","review_comments_url":"https://api.github.com/repos/docker/notary/pulls/786/comments","review_comment_url":"https://api.github.com/repos/docker/notary/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/notary/issues/786/comments","statuses_url":"https://api.github.com/repos/docker/notary/statuses/490b9c72f4b936983953f7d1f7bfd05875370582","head":{"label":"avaid96:nearexpirywarnings","ref":"nearexpirywarnings","sha":"490b9c72f4b936983953f7d1f7bfd05875370582","user":{"login":"avaid96","id":9308841,"avatar_url":"https://avatars.githubusercontent.com/u/9308841?v=3","gravatar_id":"","url":"https://api.github.com/users/avaid96","html_url":"https://github.com/avaid96","followers_url":"https://api.github.com/users/avaid96/followers","following_url":"https://api.github.com/users/avaid96/following{/other_user}","gists_url":"https://api.github.com/users/avaid96/gists{/gist_id}","starred_url":"https://api.github.com/users/avaid96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avaid96/subscriptions","organizations_url":"https://api.github.com/users/avaid96/orgs","repos_url":"https://api.github.com/users/avaid96/repos","events_url":"https://api.github.com/users/avaid96/events{/privacy}","received_events_url":"https://api.github.com/users/avaid96/received_events","type":"User","site_admin":false},"repo":{"id":60739351,"name":"notary","full_name":"avaid96/notary","owner":{"login":"avaid96","id":9308841,"avatar_url":"https://avatars.githubusercontent.com/u/9308841?v=3","gravatar_id":"","url":"https://api.github.com/users/avaid96","html_url":"https://github.com/avaid96","followers_url":"https://api.github.com/users/avaid96/followers","following_url":"https://api.github.com/users/avaid96/following{/other_user}","gists_url":"https://api.github.com/users/avaid96/gists{/gist_id}","starred_url":"https://api.github.com/users/avaid96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avaid96/subscriptions","organizations_url":"https://api.github.com/users/avaid96/orgs","repos_url":"https://api.github.com/users/avaid96/repos","events_url":"https://api.github.com/users/avaid96/events{/privacy}","received_events_url":"https://api.github.com/users/avaid96/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/avaid96/notary","description":"Notary is a Docker project that allows anyone to have trust over arbitrary collections of data","fork":true,"url":"https://api.github.com/repos/avaid96/notary","forks_url":"https://api.github.com/repos/avaid96/notary/forks","keys_url":"https://api.github.com/repos/avaid96/notary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/avaid96/notary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/avaid96/notary/teams","hooks_url":"https://api.github.com/repos/avaid96/notary/hooks","issue_events_url":"https://api.github.com/repos/avaid96/notary/issues/events{/number}","events_url":"https://api.github.com/repos/avaid96/notary/events","assignees_url":"https://api.github.com/repos/avaid96/notary/assignees{/user}","branches_url":"https://api.github.com/repos/avaid96/notary/branches{/branch}","tags_url":"https://api.github.com/repos/avaid96/notary/tags","blobs_url":"https://api.github.com/repos/avaid96/notary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/avaid96/notary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/avaid96/notary/git/refs{/sha}","trees_url":"https://api.github.com/repos/avaid96/notary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/avaid96/notary/statuses/{sha}","languages_url":"https://api.github.com/repos/avaid96/notary/languages","stargazers_url":"https://api.github.com/repos/avaid96/notary/stargazers","contributors_url":"https://api.github.com/repos/avaid96/notary/contributors","subscribers_url":"https://api.github.com/repos/avaid96/notary/subscribers","subscription_url":"https://api.github.com/repos/avaid96/notary/subscription","commits_url":"https://api.github.com/repos/avaid96/notary/commits{/sha}","git_commits_url":"https://api.github.com/repos/avaid96/notary/git/commits{/sha}","comments_url":"https://api.github.com/repos/avaid96/notary/comments{/number}","issue_comment_url":"https://api.github.com/repos/avaid96/notary/issues/comments{/number}","contents_url":"https://api.github.com/repos/avaid96/notary/contents/{+path}","compare_url":"https://api.github.com/repos/avaid96/notary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/avaid96/notary/merges","archive_url":"https://api.github.com/repos/avaid96/notary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/avaid96/notary/downloads","issues_url":"https://api.github.com/repos/avaid96/notary/issues{/number}","pulls_url":"https://api.github.com/repos/avaid96/notary/pulls{/number}","milestones_url":"https://api.github.com/repos/avaid96/notary/milestones{/number}","notifications_url":"https://api.github.com/repos/avaid96/notary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/avaid96/notary/labels{/name}","releases_url":"https://api.github.com/repos/avaid96/notary/releases{/id}","deployments_url":"https://api.github.com/repos/avaid96/notary/deployments","created_at":"2016-06-09T00:13:00Z","updated_at":"2016-06-09T00:13:04Z","pushed_at":"2016-06-14T18:51:42Z","git_url":"git://github.com/avaid96/notary.git","ssh_url":"git@github.com:avaid96/notary.git","clone_url":"https://github.com/avaid96/notary.git","svn_url":"https://github.com/avaid96/notary","homepage":"https://docker.com","size":27081,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"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":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"acc4e1b1fadc471afe3d74956252126653448eab","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":37743436,"name":"notary","full_name":"docker/notary","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/notary","description":"Notary is a Docker project that allows anyone to have trust over arbitrary collections of data","fork":false,"url":"https://api.github.com/repos/docker/notary","forks_url":"https://api.github.com/repos/docker/notary/forks","keys_url":"https://api.github.com/repos/docker/notary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/notary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/notary/teams","hooks_url":"https://api.github.com/repos/docker/notary/hooks","issue_events_url":"https://api.github.com/repos/docker/notary/issues/events{/number}","events_url":"https://api.github.com/repos/docker/notary/events","assignees_url":"https://api.github.com/repos/docker/notary/assignees{/user}","branches_url":"https://api.github.com/repos/docker/notary/branches{/branch}","tags_url":"https://api.github.com/repos/docker/notary/tags","blobs_url":"https://api.github.com/repos/docker/notary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/notary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/notary/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/notary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/notary/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/notary/languages","stargazers_url":"https://api.github.com/repos/docker/notary/stargazers","contributors_url":"https://api.github.com/repos/docker/notary/contributors","subscribers_url":"https://api.github.com/repos/docker/notary/subscribers","subscription_url":"https://api.github.com/repos/docker/notary/subscription","commits_url":"https://api.github.com/repos/docker/notary/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/notary/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/notary/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/notary/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/notary/contents/{+path}","compare_url":"https://api.github.com/repos/docker/notary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/notary/merges","archive_url":"https://api.github.com/repos/docker/notary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/notary/downloads","issues_url":"https://api.github.com/repos/docker/notary/issues{/number}","pulls_url":"https://api.github.com/repos/docker/notary/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/notary/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/notary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/notary/labels{/name}","releases_url":"https://api.github.com/repos/docker/notary/releases{/id}","deployments_url":"https://api.github.com/repos/docker/notary/deployments","created_at":"2015-06-19T20:07:53Z","updated_at":"2016-06-13T03:50:25Z","pushed_at":"2016-06-14T18:51:43Z","git_url":"git://github.com/docker/notary.git","ssh_url":"git@github.com:docker/notary.git","clone_url":"https://github.com/docker/notary.git","svn_url":"https://github.com/docker/notary","homepage":"https://docker.com","size":31335,"stargazers_count":648,"watchers_count":648,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":100,"forks":96,"open_issues":100,"watchers":648,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/notary/pulls/786"},"html":{"href":"https://github.com/docker/notary/pull/786"},"issue":{"href":"https://api.github.com/repos/docker/notary/issues/786"},"comments":{"href":"https://api.github.com/repos/docker/notary/issues/786/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/notary/pulls/786/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/notary/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/notary/pulls/786/commits"},"statuses":{"href":"https://api.github.com/repos/docker/notary/statuses/490b9c72f4b936983953f7d1f7bfd05875370582"}}}}
{"actor":{"display_login":"avaid96"}}