{"action":"created","comment":{"url":"https://api.github.com/repos/project-fifo/chunter/pulls/comments/67610059","id":67610059,"diff_hunk":"@@ -1146,6 +1278,33 @@ finish_rollback_snapshot(_VM, _SnapID, _, error) ->\n     lager:error(\"Snapshot rollback failed!\"),\n     error.\n \n+do_auto_backup_snapshot(<<_:1/binary, P/binary>>, VM, SnapID, [JobName, OutdatedAutoBackupSnapIDs]) ->\n+    ls_vm:log(VM, <<\"Creating auto-backup snapshot \", SnapID/binary, \": \", JobName/binary>>),\n+    Result = chunter_zfs:snapshot(P, SnapID),\n+\n+    % delete outdated auto-backup snapshot\n+    lists:foreach(fun(OutdatedAutoBackSnapID) ->\n+        ls_vm:log(VM, <<\"Deleting outdated auto-backup snapshot \", OutdatedAutoBackSnapID/binary, \": \", JobName/binary>>),\n+        chunter_zfs:destroy_snapshot(P, OutdatedAutoBackSnapID, [f, r])\n+    end, OutdatedAutoBackupSnapIDs),\n+\n+    Result.\n+\n+finish_auto_backup_snapshot(VM, SnapID, [JobName, OutdatedAutoBackupSnapIDs], ok) ->\n+    lager:debug(\"Creating auto-backup snapshot:~p\", [SnapID]),\n+    ls_vm:set_snapshot(VM,\n+                 [{[SnapID, <<\"timestamp\">>], timestamp()},\n+                  {[SnapID, <<\"comment\">>], JobName},\n+                  {[SnapID, <<\"state\">>], <<\"completed\">>}]),\n+\n+    lists:foreach(fun(OutdatedAutoBackSnapID) ->\n+        lager:debug(\"Deleting outdated auto-backup snapshot:~p\", [OutdatedAutoBackSnapID]),","path":"apps/chunter/src/chunter_vm_fsm.erl","position":227,"original_position":227,"commit_id":"7b684e030c2896ca6a306de09aca37e59bcd7e9f","original_commit_id":"7b684e030c2896ca6a306de09aca37e59bcd7e9f","user":{"login":"elvisci","id":8136322,"avatar_url":"https://avatars.githubusercontent.com/u/8136322?v=3","gravatar_id":"","url":"https://api.github.com/users/elvisci","html_url":"https://github.com/elvisci","followers_url":"https://api.github.com/users/elvisci/followers","following_url":"https://api.github.com/users/elvisci/following{/other_user}","gists_url":"https://api.github.com/users/elvisci/gists{/gist_id}","starred_url":"https://api.github.com/users/elvisci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elvisci/subscriptions","organizations_url":"https://api.github.com/users/elvisci/orgs","repos_url":"https://api.github.com/users/elvisci/repos","events_url":"https://api.github.com/users/elvisci/events{/privacy}","received_events_url":"https://api.github.com/users/elvisci/received_events","type":"User","site_admin":false},"body":"Line 1301 is too long:         lager:debug(\"Deleting outdated auto-backup snapshot:~p\", [OutdatedAutoBackSnapID]),.","created_at":"2016-06-19T04:21:19Z","updated_at":"2016-06-19T04:21:19Z","html_url":"https://github.com/project-fifo/chunter/pull/21#discussion_r67610059","pull_request_url":"https://api.github.com/repos/project-fifo/chunter/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/project-fifo/chunter/pulls/comments/67610059"},"html":{"href":"https://github.com/project-fifo/chunter/pull/21#discussion_r67610059"},"pull_request":{"href":"https://api.github.com/repos/project-fifo/chunter/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/project-fifo/chunter/pulls/21","id":74354327,"html_url":"https://github.com/project-fifo/chunter/pull/21","diff_url":"https://github.com/project-fifo/chunter/pull/21.diff","patch_url":"https://github.com/project-fifo/chunter/pull/21.patch","issue_url":"https://api.github.com/repos/project-fifo/chunter/issues/21","number":21,"state":"open","locked":false,"title":"Auto backup cleaned","user":{"login":"liuzhen","id":79963,"avatar_url":"https://avatars.githubusercontent.com/u/79963?v=3","gravatar_id":"","url":"https://api.github.com/users/liuzhen","html_url":"https://github.com/liuzhen","followers_url":"https://api.github.com/users/liuzhen/followers","following_url":"https://api.github.com/users/liuzhen/following{/other_user}","gists_url":"https://api.github.com/users/liuzhen/gists{/gist_id}","starred_url":"https://api.github.com/users/liuzhen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuzhen/subscriptions","organizations_url":"https://api.github.com/users/liuzhen/orgs","repos_url":"https://api.github.com/users/liuzhen/repos","events_url":"https://api.github.com/users/liuzhen/events{/privacy}","received_events_url":"https://api.github.com/users/liuzhen/received_events","type":"User","site_admin":false},"body":"pls take a look. ;)","created_at":"2016-06-19T04:21:15Z","updated_at":"2016-06-19T04:21:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0070fe52325e808dd18727ee242c2ac2dfb63fa1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/project-fifo/chunter/pulls/21/commits","review_comments_url":"https://api.github.com/repos/project-fifo/chunter/pulls/21/comments","review_comment_url":"https://api.github.com/repos/project-fifo/chunter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/project-fifo/chunter/issues/21/comments","statuses_url":"https://api.github.com/repos/project-fifo/chunter/statuses/7b684e030c2896ca6a306de09aca37e59bcd7e9f","head":{"label":"liuzhen:origin_test","ref":"origin_test","sha":"7b684e030c2896ca6a306de09aca37e59bcd7e9f","user":{"login":"liuzhen","id":79963,"avatar_url":"https://avatars.githubusercontent.com/u/79963?v=3","gravatar_id":"","url":"https://api.github.com/users/liuzhen","html_url":"https://github.com/liuzhen","followers_url":"https://api.github.com/users/liuzhen/followers","following_url":"https://api.github.com/users/liuzhen/following{/other_user}","gists_url":"https://api.github.com/users/liuzhen/gists{/gist_id}","starred_url":"https://api.github.com/users/liuzhen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuzhen/subscriptions","organizations_url":"https://api.github.com/users/liuzhen/orgs","repos_url":"https://api.github.com/users/liuzhen/repos","events_url":"https://api.github.com/users/liuzhen/events{/privacy}","received_events_url":"https://api.github.com/users/liuzhen/received_events","type":"User","site_admin":false},"repo":{"id":54014344,"name":"chunter","full_name":"liuzhen/chunter","owner":{"login":"liuzhen","id":79963,"avatar_url":"https://avatars.githubusercontent.com/u/79963?v=3","gravatar_id":"","url":"https://api.github.com/users/liuzhen","html_url":"https://github.com/liuzhen","followers_url":"https://api.github.com/users/liuzhen/followers","following_url":"https://api.github.com/users/liuzhen/following{/other_user}","gists_url":"https://api.github.com/users/liuzhen/gists{/gist_id}","starred_url":"https://api.github.com/users/liuzhen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuzhen/subscriptions","organizations_url":"https://api.github.com/users/liuzhen/orgs","repos_url":"https://api.github.com/users/liuzhen/repos","events_url":"https://api.github.com/users/liuzhen/events{/privacy}","received_events_url":"https://api.github.com/users/liuzhen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/liuzhen/chunter","description":"A monitoring/controlling tool for smartOS","fork":true,"url":"https://api.github.com/repos/liuzhen/chunter","forks_url":"https://api.github.com/repos/liuzhen/chunter/forks","keys_url":"https://api.github.com/repos/liuzhen/chunter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liuzhen/chunter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liuzhen/chunter/teams","hooks_url":"https://api.github.com/repos/liuzhen/chunter/hooks","issue_events_url":"https://api.github.com/repos/liuzhen/chunter/issues/events{/number}","events_url":"https://api.github.com/repos/liuzhen/chunter/events","assignees_url":"https://api.github.com/repos/liuzhen/chunter/assignees{/user}","branches_url":"https://api.github.com/repos/liuzhen/chunter/branches{/branch}","tags_url":"https://api.github.com/repos/liuzhen/chunter/tags","blobs_url":"https://api.github.com/repos/liuzhen/chunter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liuzhen/chunter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liuzhen/chunter/git/refs{/sha}","trees_url":"https://api.github.com/repos/liuzhen/chunter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liuzhen/chunter/statuses/{sha}","languages_url":"https://api.github.com/repos/liuzhen/chunter/languages","stargazers_url":"https://api.github.com/repos/liuzhen/chunter/stargazers","contributors_url":"https://api.github.com/repos/liuzhen/chunter/contributors","subscribers_url":"https://api.github.com/repos/liuzhen/chunter/subscribers","subscription_url":"https://api.github.com/repos/liuzhen/chunter/subscription","commits_url":"https://api.github.com/repos/liuzhen/chunter/commits{/sha}","git_commits_url":"https://api.github.com/repos/liuzhen/chunter/git/commits{/sha}","comments_url":"https://api.github.com/repos/liuzhen/chunter/comments{/number}","issue_comment_url":"https://api.github.com/repos/liuzhen/chunter/issues/comments{/number}","contents_url":"https://api.github.com/repos/liuzhen/chunter/contents/{+path}","compare_url":"https://api.github.com/repos/liuzhen/chunter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liuzhen/chunter/merges","archive_url":"https://api.github.com/repos/liuzhen/chunter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liuzhen/chunter/downloads","issues_url":"https://api.github.com/repos/liuzhen/chunter/issues{/number}","pulls_url":"https://api.github.com/repos/liuzhen/chunter/pulls{/number}","milestones_url":"https://api.github.com/repos/liuzhen/chunter/milestones{/number}","notifications_url":"https://api.github.com/repos/liuzhen/chunter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liuzhen/chunter/labels{/name}","releases_url":"https://api.github.com/repos/liuzhen/chunter/releases{/id}","deployments_url":"https://api.github.com/repos/liuzhen/chunter/deployments","created_at":"2016-03-16T08:34:23Z","updated_at":"2016-03-16T08:34:24Z","pushed_at":"2016-06-19T04:18:09Z","git_url":"git://github.com/liuzhen/chunter.git","ssh_url":"git@github.com:liuzhen/chunter.git","clone_url":"https://github.com/liuzhen/chunter.git","svn_url":"https://github.com/liuzhen/chunter","homepage":"http://project-fifo.net","size":10514,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"project-fifo:test","ref":"test","sha":"7c18233b0aea60b69aaa4d4794f56cb0c7fa7cc4","user":{"login":"project-fifo","id":1711553,"avatar_url":"https://avatars.githubusercontent.com/u/1711553?v=3","gravatar_id":"","url":"https://api.github.com/users/project-fifo","html_url":"https://github.com/project-fifo","followers_url":"https://api.github.com/users/project-fifo/followers","following_url":"https://api.github.com/users/project-fifo/following{/other_user}","gists_url":"https://api.github.com/users/project-fifo/gists{/gist_id}","starred_url":"https://api.github.com/users/project-fifo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-fifo/subscriptions","organizations_url":"https://api.github.com/users/project-fifo/orgs","repos_url":"https://api.github.com/users/project-fifo/repos","events_url":"https://api.github.com/users/project-fifo/events{/privacy}","received_events_url":"https://api.github.com/users/project-fifo/received_events","type":"Organization","site_admin":false},"repo":{"id":4198147,"name":"chunter","full_name":"project-fifo/chunter","owner":{"login":"project-fifo","id":1711553,"avatar_url":"https://avatars.githubusercontent.com/u/1711553?v=3","gravatar_id":"","url":"https://api.github.com/users/project-fifo","html_url":"https://github.com/project-fifo","followers_url":"https://api.github.com/users/project-fifo/followers","following_url":"https://api.github.com/users/project-fifo/following{/other_user}","gists_url":"https://api.github.com/users/project-fifo/gists{/gist_id}","starred_url":"https://api.github.com/users/project-fifo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-fifo/subscriptions","organizations_url":"https://api.github.com/users/project-fifo/orgs","repos_url":"https://api.github.com/users/project-fifo/repos","events_url":"https://api.github.com/users/project-fifo/events{/privacy}","received_events_url":"https://api.github.com/users/project-fifo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/project-fifo/chunter","description":"A monitoring/controlling tool for smartOS","fork":false,"url":"https://api.github.com/repos/project-fifo/chunter","forks_url":"https://api.github.com/repos/project-fifo/chunter/forks","keys_url":"https://api.github.com/repos/project-fifo/chunter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project-fifo/chunter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project-fifo/chunter/teams","hooks_url":"https://api.github.com/repos/project-fifo/chunter/hooks","issue_events_url":"https://api.github.com/repos/project-fifo/chunter/issues/events{/number}","events_url":"https://api.github.com/repos/project-fifo/chunter/events","assignees_url":"https://api.github.com/repos/project-fifo/chunter/assignees{/user}","branches_url":"https://api.github.com/repos/project-fifo/chunter/branches{/branch}","tags_url":"https://api.github.com/repos/project-fifo/chunter/tags","blobs_url":"https://api.github.com/repos/project-fifo/chunter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project-fifo/chunter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project-fifo/chunter/git/refs{/sha}","trees_url":"https://api.github.com/repos/project-fifo/chunter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project-fifo/chunter/statuses/{sha}","languages_url":"https://api.github.com/repos/project-fifo/chunter/languages","stargazers_url":"https://api.github.com/repos/project-fifo/chunter/stargazers","contributors_url":"https://api.github.com/repos/project-fifo/chunter/contributors","subscribers_url":"https://api.github.com/repos/project-fifo/chunter/subscribers","subscription_url":"https://api.github.com/repos/project-fifo/chunter/subscription","commits_url":"https://api.github.com/repos/project-fifo/chunter/commits{/sha}","git_commits_url":"https://api.github.com/repos/project-fifo/chunter/git/commits{/sha}","comments_url":"https://api.github.com/repos/project-fifo/chunter/comments{/number}","issue_comment_url":"https://api.github.com/repos/project-fifo/chunter/issues/comments{/number}","contents_url":"https://api.github.com/repos/project-fifo/chunter/contents/{+path}","compare_url":"https://api.github.com/repos/project-fifo/chunter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project-fifo/chunter/merges","archive_url":"https://api.github.com/repos/project-fifo/chunter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project-fifo/chunter/downloads","issues_url":"https://api.github.com/repos/project-fifo/chunter/issues{/number}","pulls_url":"https://api.github.com/repos/project-fifo/chunter/pulls{/number}","milestones_url":"https://api.github.com/repos/project-fifo/chunter/milestones{/number}","notifications_url":"https://api.github.com/repos/project-fifo/chunter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project-fifo/chunter/labels{/name}","releases_url":"https://api.github.com/repos/project-fifo/chunter/releases{/id}","deployments_url":"https://api.github.com/repos/project-fifo/chunter/deployments","created_at":"2012-05-02T00:40:39Z","updated_at":"2016-05-25T18:09:18Z","pushed_at":"2016-06-19T04:21:15Z","git_url":"git://github.com/project-fifo/chunter.git","ssh_url":"git@github.com:project-fifo/chunter.git","clone_url":"https://github.com/project-fifo/chunter.git","svn_url":"https://github.com/project-fifo/chunter","homepage":"http://project-fifo.net","size":10519,"stargazers_count":21,"watchers_count":21,"language":"Erlang","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":1,"forks":14,"open_issues":1,"watchers":21,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/project-fifo/chunter/pulls/21"},"html":{"href":"https://github.com/project-fifo/chunter/pull/21"},"issue":{"href":"https://api.github.com/repos/project-fifo/chunter/issues/21"},"comments":{"href":"https://api.github.com/repos/project-fifo/chunter/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/project-fifo/chunter/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/project-fifo/chunter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/project-fifo/chunter/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/project-fifo/chunter/statuses/7b684e030c2896ca6a306de09aca37e59bcd7e9f"}}}}
{"actor":{"display_login":"elvisci"}}