{"action":"created","comment":{"url":"https://api.github.com/repos/riuvshin/vault-manager/pulls/comments/236385590","pull_request_review_id":178449877,"id":236385590,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjM4NTU5MA==","diff_hunk":"@@ -127,3 +127,15 @@ func DataInSecret(data map[string]interface{}, path string, client *api.Client)\n \t}\n \treturn true\n }\n+\n+// adds \"s\" time unit if no time unit set\n+func ensureTimeUnitIsSet(duration string) string {","path":"pkg/vault/reconcile.go","position":37,"original_position":37,"commit_id":"a54ccbef564a576ee97adaae11cd3e73c97131fd","original_commit_id":"a54ccbef564a576ee97adaae11cd3e73c97131fd","user":{"login":"jzelinskie","id":343539,"node_id":"MDQ6VXNlcjM0MzUzOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/343539?v=4","gravatar_id":"","url":"https://api.github.com/users/jzelinskie","html_url":"https://github.com/jzelinskie","followers_url":"https://api.github.com/users/jzelinskie/followers","following_url":"https://api.github.com/users/jzelinskie/following{/other_user}","gists_url":"https://api.github.com/users/jzelinskie/gists{/gist_id}","starred_url":"https://api.github.com/users/jzelinskie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzelinskie/subscriptions","organizations_url":"https://api.github.com/users/jzelinskie/orgs","repos_url":"https://api.github.com/users/jzelinskie/repos","events_url":"https://api.github.com/users/jzelinskie/events{/privacy}","received_events_url":"https://api.github.com/users/jzelinskie/received_events","type":"User","site_admin":false},"body":"Let's invert the logic here to simplify things:\r\n\r\n```go\r\nlastChar := string([]rune(duration)[len(duration)-1])\r\nif strings.ContainsAny(lastChar, \"1234567890\") {\r\n  return duration + \"s\"\r\n}\r\nreturn duration\r\n```","created_at":"2018-11-26T19:02:09Z","updated_at":"2018-11-26T19:35:00Z","html_url":"https://github.com/riuvshin/vault-manager/pull/4#discussion_r236385590","pull_request_url":"https://api.github.com/repos/riuvshin/vault-manager/pulls/4","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/riuvshin/vault-manager/pulls/comments/236385590"},"html":{"href":"https://github.com/riuvshin/vault-manager/pull/4#discussion_r236385590"},"pull_request":{"href":"https://api.github.com/repos/riuvshin/vault-manager/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/riuvshin/vault-manager/pulls/4","id":233244334,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzMjQ0MzM0","html_url":"https://github.com/riuvshin/vault-manager/pull/4","diff_url":"https://github.com/riuvshin/vault-manager/pull/4.diff","patch_url":"https://github.com/riuvshin/vault-manager/pull/4.patch","issue_url":"https://api.github.com/repos/riuvshin/vault-manager/issues/4","number":4,"state":"open","locked":false,"title":"fix approle overwrites, add missing approle opts, adapt tests","user":{"login":"riuvshin","id":1636732,"node_id":"MDQ6VXNlcjE2MzY3MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1636732?v=4","gravatar_id":"","url":"https://api.github.com/users/riuvshin","html_url":"https://github.com/riuvshin","followers_url":"https://api.github.com/users/riuvshin/followers","following_url":"https://api.github.com/users/riuvshin/following{/other_user}","gists_url":"https://api.github.com/users/riuvshin/gists{/gist_id}","starred_url":"https://api.github.com/users/riuvshin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riuvshin/subscriptions","organizations_url":"https://api.github.com/users/riuvshin/orgs","repos_url":"https://api.github.com/users/riuvshin/repos","events_url":"https://api.github.com/users/riuvshin/events{/privacy}","received_events_url":"https://api.github.com/users/riuvshin/received_events","type":"User","site_admin":false},"body":"fix approle overwrites, add missing approle opts, adapt tests","created_at":"2018-11-23T16:28:08Z","updated_at":"2018-11-26T19:35:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae2043d89cd6b6c864dd05eecfd3023e9d5bb04e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/riuvshin/vault-manager/pulls/4/commits","review_comments_url":"https://api.github.com/repos/riuvshin/vault-manager/pulls/4/comments","review_comment_url":"https://api.github.com/repos/riuvshin/vault-manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/riuvshin/vault-manager/issues/4/comments","statuses_url":"https://api.github.com/repos/riuvshin/vault-manager/statuses/a54ccbef564a576ee97adaae11cd3e73c97131fd","head":{"label":"riuvshin:approles_fix","ref":"approles_fix","sha":"a54ccbef564a576ee97adaae11cd3e73c97131fd","user":{"login":"riuvshin","id":1636732,"node_id":"MDQ6VXNlcjE2MzY3MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1636732?v=4","gravatar_id":"","url":"https://api.github.com/users/riuvshin","html_url":"https://github.com/riuvshin","followers_url":"https://api.github.com/users/riuvshin/followers","following_url":"https://api.github.com/users/riuvshin/following{/other_user}","gists_url":"https://api.github.com/users/riuvshin/gists{/gist_id}","starred_url":"https://api.github.com/users/riuvshin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riuvshin/subscriptions","organizations_url":"https://api.github.com/users/riuvshin/orgs","repos_url":"https://api.github.com/users/riuvshin/repos","events_url":"https://api.github.com/users/riuvshin/events{/privacy}","received_events_url":"https://api.github.com/users/riuvshin/received_events","type":"User","site_admin":false},"repo":{"id":148698485,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg2OTg0ODU=","name":"vault-manager","full_name":"riuvshin/vault-manager","private":false,"owner":{"login":"riuvshin","id":1636732,"node_id":"MDQ6VXNlcjE2MzY3MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1636732?v=4","gravatar_id":"","url":"https://api.github.com/users/riuvshin","html_url":"https://github.com/riuvshin","followers_url":"https://api.github.com/users/riuvshin/followers","following_url":"https://api.github.com/users/riuvshin/following{/other_user}","gists_url":"https://api.github.com/users/riuvshin/gists{/gist_id}","starred_url":"https://api.github.com/users/riuvshin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riuvshin/subscriptions","organizations_url":"https://api.github.com/users/riuvshin/orgs","repos_url":"https://api.github.com/users/riuvshin/repos","events_url":"https://api.github.com/users/riuvshin/events{/privacy}","received_events_url":"https://api.github.com/users/riuvshin/received_events","type":"User","site_admin":false},"html_url":"https://github.com/riuvshin/vault-manager","description":null,"fork":false,"url":"https://api.github.com/repos/riuvshin/vault-manager","forks_url":"https://api.github.com/repos/riuvshin/vault-manager/forks","keys_url":"https://api.github.com/repos/riuvshin/vault-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/riuvshin/vault-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/riuvshin/vault-manager/teams","hooks_url":"https://api.github.com/repos/riuvshin/vault-manager/hooks","issue_events_url":"https://api.github.com/repos/riuvshin/vault-manager/issues/events{/number}","events_url":"https://api.github.com/repos/riuvshin/vault-manager/events","assignees_url":"https://api.github.com/repos/riuvshin/vault-manager/assignees{/user}","branches_url":"https://api.github.com/repos/riuvshin/vault-manager/branches{/branch}","tags_url":"https://api.github.com/repos/riuvshin/vault-manager/tags","blobs_url":"https://api.github.com/repos/riuvshin/vault-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/riuvshin/vault-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/riuvshin/vault-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/riuvshin/vault-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/riuvshin/vault-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/riuvshin/vault-manager/languages","stargazers_url":"https://api.github.com/repos/riuvshin/vault-manager/stargazers","contributors_url":"https://api.github.com/repos/riuvshin/vault-manager/contributors","subscribers_url":"https://api.github.com/repos/riuvshin/vault-manager/subscribers","subscription_url":"https://api.github.com/repos/riuvshin/vault-manager/subscription","commits_url":"https://api.github.com/repos/riuvshin/vault-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/riuvshin/vault-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/riuvshin/vault-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/riuvshin/vault-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/riuvshin/vault-manager/contents/{+path}","compare_url":"https://api.github.com/repos/riuvshin/vault-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/riuvshin/vault-manager/merges","archive_url":"https://api.github.com/repos/riuvshin/vault-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/riuvshin/vault-manager/downloads","issues_url":"https://api.github.com/repos/riuvshin/vault-manager/issues{/number}","pulls_url":"https://api.github.com/repos/riuvshin/vault-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/riuvshin/vault-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/riuvshin/vault-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/riuvshin/vault-manager/labels{/name}","releases_url":"https://api.github.com/repos/riuvshin/vault-manager/releases{/id}","deployments_url":"https://api.github.com/repos/riuvshin/vault-manager/deployments","created_at":"2018-09-13T21:10:23Z","updated_at":"2018-10-18T15:54:06Z","pushed_at":"2018-11-23T16:35:33Z","git_url":"git://github.com/riuvshin/vault-manager.git","ssh_url":"git@github.com:riuvshin/vault-manager.git","clone_url":"https://github.com/riuvshin/vault-manager.git","svn_url":"https://github.com/riuvshin/vault-manager","homepage":null,"size":2938,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"riuvshin:refactor","ref":"refactor","sha":"aad76161217b65163ee2cb2cf8e0a146757a0e12","user":{"login":"riuvshin","id":1636732,"node_id":"MDQ6VXNlcjE2MzY3MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1636732?v=4","gravatar_id":"","url":"https://api.github.com/users/riuvshin","html_url":"https://github.com/riuvshin","followers_url":"https://api.github.com/users/riuvshin/followers","following_url":"https://api.github.com/users/riuvshin/following{/other_user}","gists_url":"https://api.github.com/users/riuvshin/gists{/gist_id}","starred_url":"https://api.github.com/users/riuvshin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riuvshin/subscriptions","organizations_url":"https://api.github.com/users/riuvshin/orgs","repos_url":"https://api.github.com/users/riuvshin/repos","events_url":"https://api.github.com/users/riuvshin/events{/privacy}","received_events_url":"https://api.github.com/users/riuvshin/received_events","type":"User","site_admin":false},"repo":{"id":148698485,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg2OTg0ODU=","name":"vault-manager","full_name":"riuvshin/vault-manager","private":false,"owner":{"login":"riuvshin","id":1636732,"node_id":"MDQ6VXNlcjE2MzY3MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1636732?v=4","gravatar_id":"","url":"https://api.github.com/users/riuvshin","html_url":"https://github.com/riuvshin","followers_url":"https://api.github.com/users/riuvshin/followers","following_url":"https://api.github.com/users/riuvshin/following{/other_user}","gists_url":"https://api.github.com/users/riuvshin/gists{/gist_id}","starred_url":"https://api.github.com/users/riuvshin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riuvshin/subscriptions","organizations_url":"https://api.github.com/users/riuvshin/orgs","repos_url":"https://api.github.com/users/riuvshin/repos","events_url":"https://api.github.com/users/riuvshin/events{/privacy}","received_events_url":"https://api.github.com/users/riuvshin/received_events","type":"User","site_admin":false},"html_url":"https://github.com/riuvshin/vault-manager","description":null,"fork":false,"url":"https://api.github.com/repos/riuvshin/vault-manager","forks_url":"https://api.github.com/repos/riuvshin/vault-manager/forks","keys_url":"https://api.github.com/repos/riuvshin/vault-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/riuvshin/vault-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/riuvshin/vault-manager/teams","hooks_url":"https://api.github.com/repos/riuvshin/vault-manager/hooks","issue_events_url":"https://api.github.com/repos/riuvshin/vault-manager/issues/events{/number}","events_url":"https://api.github.com/repos/riuvshin/vault-manager/events","assignees_url":"https://api.github.com/repos/riuvshin/vault-manager/assignees{/user}","branches_url":"https://api.github.com/repos/riuvshin/vault-manager/branches{/branch}","tags_url":"https://api.github.com/repos/riuvshin/vault-manager/tags","blobs_url":"https://api.github.com/repos/riuvshin/vault-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/riuvshin/vault-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/riuvshin/vault-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/riuvshin/vault-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/riuvshin/vault-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/riuvshin/vault-manager/languages","stargazers_url":"https://api.github.com/repos/riuvshin/vault-manager/stargazers","contributors_url":"https://api.github.com/repos/riuvshin/vault-manager/contributors","subscribers_url":"https://api.github.com/repos/riuvshin/vault-manager/subscribers","subscription_url":"https://api.github.com/repos/riuvshin/vault-manager/subscription","commits_url":"https://api.github.com/repos/riuvshin/vault-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/riuvshin/vault-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/riuvshin/vault-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/riuvshin/vault-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/riuvshin/vault-manager/contents/{+path}","compare_url":"https://api.github.com/repos/riuvshin/vault-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/riuvshin/vault-manager/merges","archive_url":"https://api.github.com/repos/riuvshin/vault-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/riuvshin/vault-manager/downloads","issues_url":"https://api.github.com/repos/riuvshin/vault-manager/issues{/number}","pulls_url":"https://api.github.com/repos/riuvshin/vault-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/riuvshin/vault-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/riuvshin/vault-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/riuvshin/vault-manager/labels{/name}","releases_url":"https://api.github.com/repos/riuvshin/vault-manager/releases{/id}","deployments_url":"https://api.github.com/repos/riuvshin/vault-manager/deployments","created_at":"2018-09-13T21:10:23Z","updated_at":"2018-10-18T15:54:06Z","pushed_at":"2018-11-23T16:35:33Z","git_url":"git://github.com/riuvshin/vault-manager.git","ssh_url":"git@github.com:riuvshin/vault-manager.git","clone_url":"https://github.com/riuvshin/vault-manager.git","svn_url":"https://github.com/riuvshin/vault-manager","homepage":null,"size":2938,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/riuvshin/vault-manager/pulls/4"},"html":{"href":"https://github.com/riuvshin/vault-manager/pull/4"},"issue":{"href":"https://api.github.com/repos/riuvshin/vault-manager/issues/4"},"comments":{"href":"https://api.github.com/repos/riuvshin/vault-manager/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/riuvshin/vault-manager/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/riuvshin/vault-manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/riuvshin/vault-manager/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/riuvshin/vault-manager/statuses/a54ccbef564a576ee97adaae11cd3e73c97131fd"}},"author_association":"OWNER"}}
{"actor":{"display_login":"jzelinskie"}}