{"action":"created","comment":{"url":"https://api.github.com/repos/spinnaker/deck-kayenta/pulls/comments/227884473","pull_request_review_id":168026699,"id":227884473,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzg4NDQ3Mw==","diff_hunk":"@@ -0,0 +1,55 @@\n+import {\n+  defaultDurationObject,\n+  defaultDurationString,\n+  getDurationString,\n+  parseDurationString,\n+  IDuration,\n+} from './duration';\n+\n+describe('Duration utils', () => {\n+  let durationStrings: string[];\n+  let invalidDurationStrings: any[];\n+  let durationObjects: IDuration[];\n+  let invalidDurationObjects: any[];\n+\n+  beforeEach(() => {\n+    durationStrings = ['PT1H0M', 'PT0H10M', 'PT0H0M', 'PT20H6M'];\n+\n+    invalidDurationStrings = ['invalid', { k: 'not_a_string' }, null];\n+\n+    durationObjects = [\n+      { hours: 1, minutes: 0 },\n+      { hours: 0, minutes: 10 },\n+      { hours: 0, minutes: 0 },\n+      { hours: 20, minutes: 6 },\n+    ];\n+\n+    invalidDurationObjects = [null, 'not_an_object', { hours: 'not_an_int', minutes: -1 }];\n+  });\n+\n+  describe('parseDurationString', () => {\n+    it('converts duration string to object', () => {\n+      durationStrings.forEach((durationString, i) => {\n+        expect(parseDurationString(durationString)).toEqual(durationObjects[i]);","path":"src/kayenta/utils/duration.spec.ts","position":null,"original_position":33,"commit_id":"f1c69dddc9cb99831dae46ceace1cf5be3d91fb6","original_commit_id":"5343bb2916053e9cb72a8c57779a0ec7e41e09e7","user":{"login":"maggieneterval","id":15936279,"node_id":"MDQ6VXNlcjE1OTM2Mjc5","avatar_url":"https://avatars1.githubusercontent.com/u/15936279?v=4","gravatar_id":"","url":"https://api.github.com/users/maggieneterval","html_url":"https://github.com/maggieneterval","followers_url":"https://api.github.com/users/maggieneterval/followers","following_url":"https://api.github.com/users/maggieneterval/following{/other_user}","gists_url":"https://api.github.com/users/maggieneterval/gists{/gist_id}","starred_url":"https://api.github.com/users/maggieneterval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggieneterval/subscriptions","organizations_url":"https://api.github.com/users/maggieneterval/orgs","repos_url":"https://api.github.com/users/maggieneterval/repos","events_url":"https://api.github.com/users/maggieneterval/events{/privacy}","received_events_url":"https://api.github.com/users/maggieneterval/received_events","type":"User","site_admin":false},"body":"Great idea, updated!","created_at":"2018-10-24T17:23:21Z","updated_at":"2018-10-24T17:23:21Z","html_url":"https://github.com/spinnaker/deck-kayenta/pull/374#discussion_r227884473","pull_request_url":"https://api.github.com/repos/spinnaker/deck-kayenta/pulls/374","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/spinnaker/deck-kayenta/pulls/comments/227884473"},"html":{"href":"https://github.com/spinnaker/deck-kayenta/pull/374#discussion_r227884473"},"pull_request":{"href":"https://api.github.com/repos/spinnaker/deck-kayenta/pulls/374"}},"in_reply_to_id":227872440},"pull_request":{"url":"https://api.github.com/repos/spinnaker/deck-kayenta/pulls/374","id":225450510,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1NDUwNTEw","html_url":"https://github.com/spinnaker/deck-kayenta/pull/374","diff_url":"https://github.com/spinnaker/deck-kayenta/pull/374.diff","patch_url":"https://github.com/spinnaker/deck-kayenta/pull/374.patch","issue_url":"https://api.github.com/repos/spinnaker/deck-kayenta/issues/374","number":374,"state":"open","locked":false,"title":"feat: add Delay Before Cleanup field to stage UI (#3502)","user":{"login":"maggieneterval","id":15936279,"node_id":"MDQ6VXNlcjE1OTM2Mjc5","avatar_url":"https://avatars1.githubusercontent.com/u/15936279?v=4","gravatar_id":"","url":"https://api.github.com/users/maggieneterval","html_url":"https://github.com/maggieneterval","followers_url":"https://api.github.com/users/maggieneterval/followers","following_url":"https://api.github.com/users/maggieneterval/following{/other_user}","gists_url":"https://api.github.com/users/maggieneterval/gists{/gist_id}","starred_url":"https://api.github.com/users/maggieneterval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggieneterval/subscriptions","organizations_url":"https://api.github.com/users/maggieneterval/orgs","repos_url":"https://api.github.com/users/maggieneterval/repos","events_url":"https://api.github.com/users/maggieneterval/events{/privacy}","received_events_url":"https://api.github.com/users/maggieneterval/received_events","type":"User","site_admin":false},"body":"Closes [#3502](https://github.com/spinnaker/spinnaker/issues/3502):\r\n\r\n- Adds \"Delay Before Cleanup\" field to Realtime (Automatic) Canary Analysis stage UI\r\n- Move `Duration` parsing logic out of controller to be shared by `lifetimeDuration` and `delayBeforeCleanup` fields since both are stored on state as hours/minutes but saved to the stage as duration strings\r\n- Change \"Lifetime Duration\" field to type number to match \"Delay Before Cleanup\" field, add min=0 to hours and min=0/max=59 to minutes\r\n- Set \"Step\" min to 0\r\n\r\n![delaybeforecleanupui](https://user-images.githubusercontent.com/15936279/47441907-3b450e80-d77f-11e8-85e5-1b1e32264190.png)\r\n","created_at":"2018-10-24T15:30:04Z","updated_at":"2018-10-24T17:23:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aaf588ed74ec5d17aba565f8390650e4bb5da58a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/spinnaker/deck-kayenta/pulls/374/commits","review_comments_url":"https://api.github.com/repos/spinnaker/deck-kayenta/pulls/374/comments","review_comment_url":"https://api.github.com/repos/spinnaker/deck-kayenta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spinnaker/deck-kayenta/issues/374/comments","statuses_url":"https://api.github.com/repos/spinnaker/deck-kayenta/statuses/f1c69dddc9cb99831dae46ceace1cf5be3d91fb6","head":{"label":"maggieneterval:delayBeforeCleanup-ui","ref":"delayBeforeCleanup-ui","sha":"f1c69dddc9cb99831dae46ceace1cf5be3d91fb6","user":{"login":"maggieneterval","id":15936279,"node_id":"MDQ6VXNlcjE1OTM2Mjc5","avatar_url":"https://avatars1.githubusercontent.com/u/15936279?v=4","gravatar_id":"","url":"https://api.github.com/users/maggieneterval","html_url":"https://github.com/maggieneterval","followers_url":"https://api.github.com/users/maggieneterval/followers","following_url":"https://api.github.com/users/maggieneterval/following{/other_user}","gists_url":"https://api.github.com/users/maggieneterval/gists{/gist_id}","starred_url":"https://api.github.com/users/maggieneterval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggieneterval/subscriptions","organizations_url":"https://api.github.com/users/maggieneterval/orgs","repos_url":"https://api.github.com/users/maggieneterval/repos","events_url":"https://api.github.com/users/maggieneterval/events{/privacy}","received_events_url":"https://api.github.com/users/maggieneterval/received_events","type":"User","site_admin":false},"repo":{"id":149146048,"node_id":"MDEwOlJlcG9zaXRvcnkxNDkxNDYwNDg=","name":"deck-kayenta","full_name":"maggieneterval/deck-kayenta","private":false,"owner":{"login":"maggieneterval","id":15936279,"node_id":"MDQ6VXNlcjE1OTM2Mjc5","avatar_url":"https://avatars1.githubusercontent.com/u/15936279?v=4","gravatar_id":"","url":"https://api.github.com/users/maggieneterval","html_url":"https://github.com/maggieneterval","followers_url":"https://api.github.com/users/maggieneterval/followers","following_url":"https://api.github.com/users/maggieneterval/following{/other_user}","gists_url":"https://api.github.com/users/maggieneterval/gists{/gist_id}","starred_url":"https://api.github.com/users/maggieneterval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggieneterval/subscriptions","organizations_url":"https://api.github.com/users/maggieneterval/orgs","repos_url":"https://api.github.com/users/maggieneterval/repos","events_url":"https://api.github.com/users/maggieneterval/events{/privacy}","received_events_url":"https://api.github.com/users/maggieneterval/received_events","type":"User","site_admin":false},"html_url":"https://github.com/maggieneterval/deck-kayenta","description":"Deck UI module for automated canary service","fork":true,"url":"https://api.github.com/repos/maggieneterval/deck-kayenta","forks_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/forks","keys_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/teams","hooks_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/hooks","issue_events_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/issues/events{/number}","events_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/events","assignees_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/assignees{/user}","branches_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/branches{/branch}","tags_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/tags","blobs_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/git/refs{/sha}","trees_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/statuses/{sha}","languages_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/languages","stargazers_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/stargazers","contributors_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/contributors","subscribers_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/subscribers","subscription_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/subscription","commits_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/commits{/sha}","git_commits_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/git/commits{/sha}","comments_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/comments{/number}","issue_comment_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/issues/comments{/number}","contents_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/contents/{+path}","compare_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/merges","archive_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/downloads","issues_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/issues{/number}","pulls_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/pulls{/number}","milestones_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/milestones{/number}","notifications_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/labels{/name}","releases_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/releases{/id}","deployments_url":"https://api.github.com/repos/maggieneterval/deck-kayenta/deployments","created_at":"2018-09-17T15:22:53Z","updated_at":"2018-09-17T15:22:56Z","pushed_at":"2018-10-24T17:22:10Z","git_url":"git://github.com/maggieneterval/deck-kayenta.git","ssh_url":"git@github.com:maggieneterval/deck-kayenta.git","clone_url":"https://github.com/maggieneterval/deck-kayenta.git","svn_url":"https://github.com/maggieneterval/deck-kayenta","homepage":"","size":1290,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spinnaker:master","ref":"master","sha":"a9372549ae2300a8677084b59def879e93f44cc5","user":{"login":"spinnaker","id":7634182,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MzQxODI=","avatar_url":"https://avatars1.githubusercontent.com/u/7634182?v=4","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"repo":{"id":95231898,"node_id":"MDEwOlJlcG9zaXRvcnk5NTIzMTg5OA==","name":"deck-kayenta","full_name":"spinnaker/deck-kayenta","private":false,"owner":{"login":"spinnaker","id":7634182,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MzQxODI=","avatar_url":"https://avatars1.githubusercontent.com/u/7634182?v=4","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/spinnaker/deck-kayenta","description":"Spinnaker UI module for Kayenta","fork":false,"url":"https://api.github.com/repos/spinnaker/deck-kayenta","forks_url":"https://api.github.com/repos/spinnaker/deck-kayenta/forks","keys_url":"https://api.github.com/repos/spinnaker/deck-kayenta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spinnaker/deck-kayenta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spinnaker/deck-kayenta/teams","hooks_url":"https://api.github.com/repos/spinnaker/deck-kayenta/hooks","issue_events_url":"https://api.github.com/repos/spinnaker/deck-kayenta/issues/events{/number}","events_url":"https://api.github.com/repos/spinnaker/deck-kayenta/events","assignees_url":"https://api.github.com/repos/spinnaker/deck-kayenta/assignees{/user}","branches_url":"https://api.github.com/repos/spinnaker/deck-kayenta/branches{/branch}","tags_url":"https://api.github.com/repos/spinnaker/deck-kayenta/tags","blobs_url":"https://api.github.com/repos/spinnaker/deck-kayenta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spinnaker/deck-kayenta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spinnaker/deck-kayenta/git/refs{/sha}","trees_url":"https://api.github.com/repos/spinnaker/deck-kayenta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spinnaker/deck-kayenta/statuses/{sha}","languages_url":"https://api.github.com/repos/spinnaker/deck-kayenta/languages","stargazers_url":"https://api.github.com/repos/spinnaker/deck-kayenta/stargazers","contributors_url":"https://api.github.com/repos/spinnaker/deck-kayenta/contributors","subscribers_url":"https://api.github.com/repos/spinnaker/deck-kayenta/subscribers","subscription_url":"https://api.github.com/repos/spinnaker/deck-kayenta/subscription","commits_url":"https://api.github.com/repos/spinnaker/deck-kayenta/commits{/sha}","git_commits_url":"https://api.github.com/repos/spinnaker/deck-kayenta/git/commits{/sha}","comments_url":"https://api.github.com/repos/spinnaker/deck-kayenta/comments{/number}","issue_comment_url":"https://api.github.com/repos/spinnaker/deck-kayenta/issues/comments{/number}","contents_url":"https://api.github.com/repos/spinnaker/deck-kayenta/contents/{+path}","compare_url":"https://api.github.com/repos/spinnaker/deck-kayenta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spinnaker/deck-kayenta/merges","archive_url":"https://api.github.com/repos/spinnaker/deck-kayenta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spinnaker/deck-kayenta/downloads","issues_url":"https://api.github.com/repos/spinnaker/deck-kayenta/issues{/number}","pulls_url":"https://api.github.com/repos/spinnaker/deck-kayenta/pulls{/number}","milestones_url":"https://api.github.com/repos/spinnaker/deck-kayenta/milestones{/number}","notifications_url":"https://api.github.com/repos/spinnaker/deck-kayenta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spinnaker/deck-kayenta/labels{/name}","releases_url":"https://api.github.com/repos/spinnaker/deck-kayenta/releases{/id}","deployments_url":"https://api.github.com/repos/spinnaker/deck-kayenta/deployments","created_at":"2017-06-23T15:19:30Z","updated_at":"2018-10-19T15:31:32Z","pushed_at":"2018-10-24T17:22:11Z","git_url":"git://github.com/spinnaker/deck-kayenta.git","ssh_url":"git@github.com:spinnaker/deck-kayenta.git","clone_url":"https://github.com/spinnaker/deck-kayenta.git","svn_url":"https://github.com/spinnaker/deck-kayenta","homepage":"","size":1159,"stargazers_count":6,"watchers_count":6,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":15,"open_issues":15,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spinnaker/deck-kayenta/pulls/374"},"html":{"href":"https://github.com/spinnaker/deck-kayenta/pull/374"},"issue":{"href":"https://api.github.com/repos/spinnaker/deck-kayenta/issues/374"},"comments":{"href":"https://api.github.com/repos/spinnaker/deck-kayenta/issues/374/comments"},"review_comments":{"href":"https://api.github.com/repos/spinnaker/deck-kayenta/pulls/374/comments"},"review_comment":{"href":"https://api.github.com/repos/spinnaker/deck-kayenta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spinnaker/deck-kayenta/pulls/374/commits"},"statuses":{"href":"https://api.github.com/repos/spinnaker/deck-kayenta/statuses/f1c69dddc9cb99831dae46ceace1cf5be3d91fb6"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"maggieneterval"}}