{"action":"created","comment":{"url":"https://api.github.com/repos/yast/yast-storage/pulls/comments/30894024","id":30894024,"diff_hunk":"@@ -0,0 +1,48 @@\n+require \"yast2/fs_snapshot\"\n+require \"installation/finish_client\"\n+\n+module Storage\n+  class SnapshotsFinish < ::Installation::FinishClient\n+    include Yast::I18n\n+\n+    def initialize\n+      textdomain \"storage\"\n+\n+      Yast.import \"Mode\"\n+      Yast.import \"StorageSnapper\"\n+      Yast.include self, \"installation/misc.rb\"\n+    end\n+\n+    # Write configuration\n+    #\n+    # It creates a snapshot when no second stage is required and\n+    # Snapper is configured.\n+    #\n+    # @return [TrueClass,FalseClass] True if snapshot was created;\n+    #                                otherwise it returns false.\n+    def write\n+      if !second_stage_required? && StorageSnapper.configure_snapper?\n+        log.info(\"Creating root filesystem snapshot\")\n+        action = Mode.update ? \"upgrade\" : \"installation\"\n+        create_snapshot(:single, \"after #{action}\")\n+      else\n+        log.info(\"Skipping root filesystem snapshot creation\")\n+        false\n+      end\n+    end\n+\n+    def title\n+      _(\"Creating root filesystem snapshot...\")\n+    end\n+\n+    private\n+\n+    def create_snapshot(snapshot_type, description)","path":"src/lib/storage/snapshots_finish.rb","position":40,"original_position":40,"commit_id":"f12a50975937a9812108fc10756c3a16c8c5cda7","original_commit_id":"f12a50975937a9812108fc10756c3a16c8c5cda7","user":{"login":"jreidinger","id":478871,"avatar_url":"https://avatars.githubusercontent.com/u/478871?v=3","gravatar_id":"","url":"https://api.github.com/users/jreidinger","html_url":"https://github.com/jreidinger","followers_url":"https://api.github.com/users/jreidinger/followers","following_url":"https://api.github.com/users/jreidinger/following{/other_user}","gists_url":"https://api.github.com/users/jreidinger/gists{/gist_id}","starred_url":"https://api.github.com/users/jreidinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreidinger/subscriptions","organizations_url":"https://api.github.com/users/jreidinger/orgs","repos_url":"https://api.github.com/users/jreidinger/repos","events_url":"https://api.github.com/users/jreidinger/events{/privacy}","received_events_url":"https://api.github.com/users/jreidinger/received_events","type":"User","site_admin":false},"body":"snapshot  type is unused variable","created_at":"2015-05-22T13:24:27Z","updated_at":"2015-05-22T13:24:27Z","html_url":"https://github.com/yast/yast-storage/pull/134#discussion_r30894024","pull_request_url":"https://api.github.com/repos/yast/yast-storage/pulls/134","_links":{"self":{"href":"https://api.github.com/repos/yast/yast-storage/pulls/comments/30894024"},"html":{"href":"https://github.com/yast/yast-storage/pull/134#discussion_r30894024"},"pull_request":{"href":"https://api.github.com/repos/yast/yast-storage/pulls/134"}}},"pull_request":{"url":"https://api.github.com/repos/yast/yast-storage/pulls/134","id":36026987,"html_url":"https://github.com/yast/yast-storage/pull/134","diff_url":"https://github.com/yast/yast-storage/pull/134.diff","patch_url":"https://github.com/yast/yast-storage/pull/134.patch","issue_url":"https://api.github.com/repos/yast/yast-storage/issues/134","number":134,"state":"open","locked":false,"title":"Add a snapshots_finish client","user":{"login":"imobach","id":15836,"avatar_url":"https://avatars.githubusercontent.com/u/15836?v=3","gravatar_id":"","url":"https://api.github.com/users/imobach","html_url":"https://github.com/imobach","followers_url":"https://api.github.com/users/imobach/followers","following_url":"https://api.github.com/users/imobach/following{/other_user}","gists_url":"https://api.github.com/users/imobach/gists{/gist_id}","starred_url":"https://api.github.com/users/imobach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imobach/subscriptions","organizations_url":"https://api.github.com/users/imobach/orgs","repos_url":"https://api.github.com/users/imobach/repos","events_url":"https://api.github.com/users/imobach/events{/privacy}","received_events_url":"https://api.github.com/users/imobach/received_events","type":"User","site_admin":false},"body":"This is a client to create an snapshot after installation/upgrade.","created_at":"2015-05-22T12:41:36Z","updated_at":"2015-05-22T13:24:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f8e1468651311c2dd694136fc2080e584ad88f9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yast/yast-storage/pulls/134/commits","review_comments_url":"https://api.github.com/repos/yast/yast-storage/pulls/134/comments","review_comment_url":"https://api.github.com/repos/yast/yast-storage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yast/yast-storage/issues/134/comments","statuses_url":"https://api.github.com/repos/yast/yast-storage/statuses/f12a50975937a9812108fc10756c3a16c8c5cda7","head":{"label":"imobach:feature/add-fs-snapshots","ref":"feature/add-fs-snapshots","sha":"f12a50975937a9812108fc10756c3a16c8c5cda7","user":{"login":"imobach","id":15836,"avatar_url":"https://avatars.githubusercontent.com/u/15836?v=3","gravatar_id":"","url":"https://api.github.com/users/imobach","html_url":"https://github.com/imobach","followers_url":"https://api.github.com/users/imobach/followers","following_url":"https://api.github.com/users/imobach/following{/other_user}","gists_url":"https://api.github.com/users/imobach/gists{/gist_id}","starred_url":"https://api.github.com/users/imobach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imobach/subscriptions","organizations_url":"https://api.github.com/users/imobach/orgs","repos_url":"https://api.github.com/users/imobach/repos","events_url":"https://api.github.com/users/imobach/events{/privacy}","received_events_url":"https://api.github.com/users/imobach/received_events","type":"User","site_admin":false},"repo":{"id":36070604,"name":"yast-storage","full_name":"imobach/yast-storage","owner":{"login":"imobach","id":15836,"avatar_url":"https://avatars.githubusercontent.com/u/15836?v=3","gravatar_id":"","url":"https://api.github.com/users/imobach","html_url":"https://github.com/imobach","followers_url":"https://api.github.com/users/imobach/followers","following_url":"https://api.github.com/users/imobach/following{/other_user}","gists_url":"https://api.github.com/users/imobach/gists{/gist_id}","starred_url":"https://api.github.com/users/imobach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imobach/subscriptions","organizations_url":"https://api.github.com/users/imobach/orgs","repos_url":"https://api.github.com/users/imobach/repos","events_url":"https://api.github.com/users/imobach/events{/privacy}","received_events_url":"https://api.github.com/users/imobach/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/imobach/yast-storage","description":"YaST module storage","fork":true,"url":"https://api.github.com/repos/imobach/yast-storage","forks_url":"https://api.github.com/repos/imobach/yast-storage/forks","keys_url":"https://api.github.com/repos/imobach/yast-storage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/imobach/yast-storage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/imobach/yast-storage/teams","hooks_url":"https://api.github.com/repos/imobach/yast-storage/hooks","issue_events_url":"https://api.github.com/repos/imobach/yast-storage/issues/events{/number}","events_url":"https://api.github.com/repos/imobach/yast-storage/events","assignees_url":"https://api.github.com/repos/imobach/yast-storage/assignees{/user}","branches_url":"https://api.github.com/repos/imobach/yast-storage/branches{/branch}","tags_url":"https://api.github.com/repos/imobach/yast-storage/tags","blobs_url":"https://api.github.com/repos/imobach/yast-storage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/imobach/yast-storage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/imobach/yast-storage/git/refs{/sha}","trees_url":"https://api.github.com/repos/imobach/yast-storage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/imobach/yast-storage/statuses/{sha}","languages_url":"https://api.github.com/repos/imobach/yast-storage/languages","stargazers_url":"https://api.github.com/repos/imobach/yast-storage/stargazers","contributors_url":"https://api.github.com/repos/imobach/yast-storage/contributors","subscribers_url":"https://api.github.com/repos/imobach/yast-storage/subscribers","subscription_url":"https://api.github.com/repos/imobach/yast-storage/subscription","commits_url":"https://api.github.com/repos/imobach/yast-storage/commits{/sha}","git_commits_url":"https://api.github.com/repos/imobach/yast-storage/git/commits{/sha}","comments_url":"https://api.github.com/repos/imobach/yast-storage/comments{/number}","issue_comment_url":"https://api.github.com/repos/imobach/yast-storage/issues/comments{/number}","contents_url":"https://api.github.com/repos/imobach/yast-storage/contents/{+path}","compare_url":"https://api.github.com/repos/imobach/yast-storage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/imobach/yast-storage/merges","archive_url":"https://api.github.com/repos/imobach/yast-storage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/imobach/yast-storage/downloads","issues_url":"https://api.github.com/repos/imobach/yast-storage/issues{/number}","pulls_url":"https://api.github.com/repos/imobach/yast-storage/pulls{/number}","milestones_url":"https://api.github.com/repos/imobach/yast-storage/milestones{/number}","notifications_url":"https://api.github.com/repos/imobach/yast-storage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/imobach/yast-storage/labels{/name}","releases_url":"https://api.github.com/repos/imobach/yast-storage/releases{/id}","created_at":"2015-05-22T12:14:51Z","updated_at":"2015-05-22T12:14:52Z","pushed_at":"2015-05-22T12:38:47Z","git_url":"git://github.com/imobach/yast-storage.git","ssh_url":"git@github.com:imobach/yast-storage.git","clone_url":"https://github.com/imobach/yast-storage.git","svn_url":"https://github.com/imobach/yast-storage","homepage":"http://en.opensuse.org/Portal:YaST","size":85902,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"yast:master","ref":"master","sha":"6dcd247069ddce7a9a2d212e4d1cf2ee924a5284","user":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"repo":{"id":4368222,"name":"yast-storage","full_name":"yast/yast-storage","owner":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yast/yast-storage","description":"YaST module storage","fork":false,"url":"https://api.github.com/repos/yast/yast-storage","forks_url":"https://api.github.com/repos/yast/yast-storage/forks","keys_url":"https://api.github.com/repos/yast/yast-storage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yast/yast-storage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yast/yast-storage/teams","hooks_url":"https://api.github.com/repos/yast/yast-storage/hooks","issue_events_url":"https://api.github.com/repos/yast/yast-storage/issues/events{/number}","events_url":"https://api.github.com/repos/yast/yast-storage/events","assignees_url":"https://api.github.com/repos/yast/yast-storage/assignees{/user}","branches_url":"https://api.github.com/repos/yast/yast-storage/branches{/branch}","tags_url":"https://api.github.com/repos/yast/yast-storage/tags","blobs_url":"https://api.github.com/repos/yast/yast-storage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yast/yast-storage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yast/yast-storage/git/refs{/sha}","trees_url":"https://api.github.com/repos/yast/yast-storage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yast/yast-storage/statuses/{sha}","languages_url":"https://api.github.com/repos/yast/yast-storage/languages","stargazers_url":"https://api.github.com/repos/yast/yast-storage/stargazers","contributors_url":"https://api.github.com/repos/yast/yast-storage/contributors","subscribers_url":"https://api.github.com/repos/yast/yast-storage/subscribers","subscription_url":"https://api.github.com/repos/yast/yast-storage/subscription","commits_url":"https://api.github.com/repos/yast/yast-storage/commits{/sha}","git_commits_url":"https://api.github.com/repos/yast/yast-storage/git/commits{/sha}","comments_url":"https://api.github.com/repos/yast/yast-storage/comments{/number}","issue_comment_url":"https://api.github.com/repos/yast/yast-storage/issues/comments{/number}","contents_url":"https://api.github.com/repos/yast/yast-storage/contents/{+path}","compare_url":"https://api.github.com/repos/yast/yast-storage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yast/yast-storage/merges","archive_url":"https://api.github.com/repos/yast/yast-storage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yast/yast-storage/downloads","issues_url":"https://api.github.com/repos/yast/yast-storage/issues{/number}","pulls_url":"https://api.github.com/repos/yast/yast-storage/pulls{/number}","milestones_url":"https://api.github.com/repos/yast/yast-storage/milestones{/number}","notifications_url":"https://api.github.com/repos/yast/yast-storage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yast/yast-storage/labels{/name}","releases_url":"https://api.github.com/repos/yast/yast-storage/releases{/id}","created_at":"2012-05-18T10:26:36Z","updated_at":"2015-05-06T14:55:52Z","pushed_at":"2015-05-22T12:41:37Z","git_url":"git://github.com/yast/yast-storage.git","ssh_url":"git@github.com:yast/yast-storage.git","clone_url":"https://github.com/yast/yast-storage.git","svn_url":"https://github.com/yast/yast-storage","homepage":"http://en.opensuse.org/Portal:YaST","size":85902,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":2,"forks":9,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yast/yast-storage/pulls/134"},"html":{"href":"https://github.com/yast/yast-storage/pull/134"},"issue":{"href":"https://api.github.com/repos/yast/yast-storage/issues/134"},"comments":{"href":"https://api.github.com/repos/yast/yast-storage/issues/134/comments"},"review_comments":{"href":"https://api.github.com/repos/yast/yast-storage/pulls/134/comments"},"review_comment":{"href":"https://api.github.com/repos/yast/yast-storage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yast/yast-storage/pulls/134/commits"},"statuses":{"href":"https://api.github.com/repos/yast/yast-storage/statuses/f12a50975937a9812108fc10756c3a16c8c5cda7"}}}}