{"action":"created","comment":{"url":"https://api.github.com/repos/yast/yast-yast2/pulls/comments/34457071","id":34457071,"diff_hunk":"@@ -0,0 +1,47 @@\n+require \"config_file/config_file\"\n+require \"config_file/keyvalue_parser\"\n+\n+module ConfigFile\n+  PARSER = Keyvalue_Parser\n+  PATH = \"/etc/default/grub\"\n+\n+  class GrubConfig < ConfigFile\n+    def initialize(file_class: File)\n+      super(PARSER, PATH, file_class: file_class) \n+    end\n+\n+    def os_prober_enabled?\n+      return true unless data[\"GRUB_DISABLE_OS_PROBER\"]\n+      return data[\"GRUB_DISABLE_OS_PROBER\"][:value] != \"true\"\n+    end\n+\n+    def disable_os_prober\n+      data[\"GRUB_DISABLE_OS_PROBER\"] ||= {}\n+      data[\"GRUB_DISABLE_OS_PROBER\"][:value] = \"true\"\n+      data[\"GRUB_DISABLE_OS_PROBER\"][:commented_out] = false\n+    end\n+\n+    def enable_os_prober\n+      data[\"GRUB_DISABLE_OS_PROBER\"] ||= {}\n+      data[\"GRUB_DISABLE_OS_PROBER\"][:value] = \"false\"\n+      data[\"GRUB_DISABLE_OS_PROBER\"][:commented_out] = false\n+    end\n+\n+    def disable_recovery_entry\n+      data[\"GRUB_DISABLE_RECOVERY\"] ||= {}\n+      data[\"GRUB_DISABLE_RECOVERY\"][:value] = \"true\"\n+      data[\"GRUB_DISABLE_RECOVERY\"][:commented_out] = false\n+      data[\"GRUB_CMDLINE_LINUX_RECOVERY\"] ||= {}\n+      data[\"GRUB_CMDLINE_LINUX_RECOVERY\"][:commented_out] = true\n+    end\n+\n+    def enable_recovery_entry(kernel_params)\n+      data[\"GRUB_DISABLE_RECOVERY\"] ||= {}\n+      data[\"GRUB_DISABLE_RECOVERY\"][:value] = \"true\"\n+      data[\"GRUB_DISABLE_RECOVERY\"][:commented_out] = false\n+      data[\"GRUB_CMDLINE_LINUX_RECOVERY\"] ||= {}\n+      data[\"GRUB_CMDLINE_LINUX_RECOVERY\"][:value] = kernel_params\n+      data[\"GRUB_CMDLINE_LINUX_RECOVERY\"][:commented_out] = false","path":"library/general/src/lib/config_file/grub_config.rb","position":44,"original_position":44,"commit_id":"97df31ae9f0ffa6f350e3f7b53537b6b7ff70867","original_commit_id":"97df31ae9f0ffa6f350e3f7b53537b6b7ff70867","user":{"login":"mvidner","id":102056,"avatar_url":"https://avatars.githubusercontent.com/u/102056?v=3","gravatar_id":"","url":"https://api.github.com/users/mvidner","html_url":"https://github.com/mvidner","followers_url":"https://api.github.com/users/mvidner/followers","following_url":"https://api.github.com/users/mvidner/following{/other_user}","gists_url":"https://api.github.com/users/mvidner/gists{/gist_id}","starred_url":"https://api.github.com/users/mvidner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvidner/subscriptions","organizations_url":"https://api.github.com/users/mvidner/orgs","repos_url":"https://api.github.com/users/mvidner/repos","events_url":"https://api.github.com/users/mvidner/events{/privacy}","received_events_url":"https://api.github.com/users/mvidner/received_events","type":"User","site_admin":false},"body":"For the record, this part of the model is repetitive and would get refactored for production use, but it isn't our focus now.","created_at":"2015-07-13T12:19:33Z","updated_at":"2015-07-13T12:19:33Z","html_url":"https://github.com/yast/yast-yast2/pull/380#discussion_r34457071","pull_request_url":"https://api.github.com/repos/yast/yast-yast2/pulls/380","_links":{"self":{"href":"https://api.github.com/repos/yast/yast-yast2/pulls/comments/34457071"},"html":{"href":"https://github.com/yast/yast-yast2/pull/380#discussion_r34457071"},"pull_request":{"href":"https://api.github.com/repos/yast/yast-yast2/pulls/380"}}},"pull_request":{"url":"https://api.github.com/repos/yast/yast-yast2/pulls/380","id":39803720,"html_url":"https://github.com/yast/yast-yast2/pull/380","diff_url":"https://github.com/yast/yast-yast2/pull/380.diff","patch_url":"https://github.com/yast/yast-yast2/pull/380.patch","issue_url":"https://api.github.com/repos/yast/yast-yast2/issues/380","number":380,"state":"open","locked":false,"title":"Agent infrastructure","user":{"login":"mvidner","id":102056,"avatar_url":"https://avatars.githubusercontent.com/u/102056?v=3","gravatar_id":"","url":"https://api.github.com/users/mvidner","html_url":"https://github.com/mvidner","followers_url":"https://api.github.com/users/mvidner/followers","following_url":"https://api.github.com/users/mvidner/following{/other_user}","gists_url":"https://api.github.com/users/mvidner/gists{/gist_id}","starred_url":"https://api.github.com/users/mvidner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvidner/subscriptions","organizations_url":"https://api.github.com/users/mvidner/orgs","repos_url":"https://api.github.com/users/mvidner/repos","events_url":"https://api.github.com/users/mvidner/events{/privacy}","received_events_url":"https://api.github.com/users/mvidner/received_events","type":"User","site_admin":false},"body":"https://trello.com/c/MMlaM6sK/6-better-agent-infrastructure","created_at":"2015-07-13T11:52:24Z","updated_at":"2015-07-13T12:19:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5411d0c2ed9b993b8bf0868ef33aa77215d561b1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yast/yast-yast2/pulls/380/commits","review_comments_url":"https://api.github.com/repos/yast/yast-yast2/pulls/380/comments","review_comment_url":"https://api.github.com/repos/yast/yast-yast2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yast/yast-yast2/issues/380/comments","statuses_url":"https://api.github.com/repos/yast/yast-yast2/statuses/97df31ae9f0ffa6f350e3f7b53537b6b7ff70867","head":{"label":"yast:new_agents_infrastructure","ref":"new_agents_infrastructure","sha":"97df31ae9f0ffa6f350e3f7b53537b6b7ff70867","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":4368244,"name":"yast-yast2","full_name":"yast/yast-yast2","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-yast2","description":"YaST module yast2","fork":false,"url":"https://api.github.com/repos/yast/yast-yast2","forks_url":"https://api.github.com/repos/yast/yast-yast2/forks","keys_url":"https://api.github.com/repos/yast/yast-yast2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yast/yast-yast2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yast/yast-yast2/teams","hooks_url":"https://api.github.com/repos/yast/yast-yast2/hooks","issue_events_url":"https://api.github.com/repos/yast/yast-yast2/issues/events{/number}","events_url":"https://api.github.com/repos/yast/yast-yast2/events","assignees_url":"https://api.github.com/repos/yast/yast-yast2/assignees{/user}","branches_url":"https://api.github.com/repos/yast/yast-yast2/branches{/branch}","tags_url":"https://api.github.com/repos/yast/yast-yast2/tags","blobs_url":"https://api.github.com/repos/yast/yast-yast2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yast/yast-yast2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yast/yast-yast2/git/refs{/sha}","trees_url":"https://api.github.com/repos/yast/yast-yast2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yast/yast-yast2/statuses/{sha}","languages_url":"https://api.github.com/repos/yast/yast-yast2/languages","stargazers_url":"https://api.github.com/repos/yast/yast-yast2/stargazers","contributors_url":"https://api.github.com/repos/yast/yast-yast2/contributors","subscribers_url":"https://api.github.com/repos/yast/yast-yast2/subscribers","subscription_url":"https://api.github.com/repos/yast/yast-yast2/subscription","commits_url":"https://api.github.com/repos/yast/yast-yast2/commits{/sha}","git_commits_url":"https://api.github.com/repos/yast/yast-yast2/git/commits{/sha}","comments_url":"https://api.github.com/repos/yast/yast-yast2/comments{/number}","issue_comment_url":"https://api.github.com/repos/yast/yast-yast2/issues/comments{/number}","contents_url":"https://api.github.com/repos/yast/yast-yast2/contents/{+path}","compare_url":"https://api.github.com/repos/yast/yast-yast2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yast/yast-yast2/merges","archive_url":"https://api.github.com/repos/yast/yast-yast2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yast/yast-yast2/downloads","issues_url":"https://api.github.com/repos/yast/yast-yast2/issues{/number}","pulls_url":"https://api.github.com/repos/yast/yast-yast2/pulls{/number}","milestones_url":"https://api.github.com/repos/yast/yast-yast2/milestones{/number}","notifications_url":"https://api.github.com/repos/yast/yast-yast2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yast/yast-yast2/labels{/name}","releases_url":"https://api.github.com/repos/yast/yast-yast2/releases{/id}","created_at":"2012-05-18T10:27:22Z","updated_at":"2015-06-10T07:55:29Z","pushed_at":"2015-07-13T11:52:25Z","git_url":"git://github.com/yast/yast-yast2.git","ssh_url":"git@github.com:yast/yast-yast2.git","clone_url":"https://github.com/yast/yast-yast2.git","svn_url":"https://github.com/yast/yast-yast2","homepage":"http://en.opensuse.org/Portal:YaST","size":26457,"stargazers_count":10,"watchers_count":10,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":4,"forks":25,"open_issues":4,"watchers":10,"default_branch":"master"}},"base":{"label":"yast:master","ref":"master","sha":"3e40b182692d02ea14bf6ee1336131328be94fe4","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":4368244,"name":"yast-yast2","full_name":"yast/yast-yast2","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-yast2","description":"YaST module yast2","fork":false,"url":"https://api.github.com/repos/yast/yast-yast2","forks_url":"https://api.github.com/repos/yast/yast-yast2/forks","keys_url":"https://api.github.com/repos/yast/yast-yast2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yast/yast-yast2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yast/yast-yast2/teams","hooks_url":"https://api.github.com/repos/yast/yast-yast2/hooks","issue_events_url":"https://api.github.com/repos/yast/yast-yast2/issues/events{/number}","events_url":"https://api.github.com/repos/yast/yast-yast2/events","assignees_url":"https://api.github.com/repos/yast/yast-yast2/assignees{/user}","branches_url":"https://api.github.com/repos/yast/yast-yast2/branches{/branch}","tags_url":"https://api.github.com/repos/yast/yast-yast2/tags","blobs_url":"https://api.github.com/repos/yast/yast-yast2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yast/yast-yast2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yast/yast-yast2/git/refs{/sha}","trees_url":"https://api.github.com/repos/yast/yast-yast2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yast/yast-yast2/statuses/{sha}","languages_url":"https://api.github.com/repos/yast/yast-yast2/languages","stargazers_url":"https://api.github.com/repos/yast/yast-yast2/stargazers","contributors_url":"https://api.github.com/repos/yast/yast-yast2/contributors","subscribers_url":"https://api.github.com/repos/yast/yast-yast2/subscribers","subscription_url":"https://api.github.com/repos/yast/yast-yast2/subscription","commits_url":"https://api.github.com/repos/yast/yast-yast2/commits{/sha}","git_commits_url":"https://api.github.com/repos/yast/yast-yast2/git/commits{/sha}","comments_url":"https://api.github.com/repos/yast/yast-yast2/comments{/number}","issue_comment_url":"https://api.github.com/repos/yast/yast-yast2/issues/comments{/number}","contents_url":"https://api.github.com/repos/yast/yast-yast2/contents/{+path}","compare_url":"https://api.github.com/repos/yast/yast-yast2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yast/yast-yast2/merges","archive_url":"https://api.github.com/repos/yast/yast-yast2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yast/yast-yast2/downloads","issues_url":"https://api.github.com/repos/yast/yast-yast2/issues{/number}","pulls_url":"https://api.github.com/repos/yast/yast-yast2/pulls{/number}","milestones_url":"https://api.github.com/repos/yast/yast-yast2/milestones{/number}","notifications_url":"https://api.github.com/repos/yast/yast-yast2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yast/yast-yast2/labels{/name}","releases_url":"https://api.github.com/repos/yast/yast-yast2/releases{/id}","created_at":"2012-05-18T10:27:22Z","updated_at":"2015-06-10T07:55:29Z","pushed_at":"2015-07-13T11:52:25Z","git_url":"git://github.com/yast/yast-yast2.git","ssh_url":"git@github.com:yast/yast-yast2.git","clone_url":"https://github.com/yast/yast-yast2.git","svn_url":"https://github.com/yast/yast-yast2","homepage":"http://en.opensuse.org/Portal:YaST","size":26457,"stargazers_count":10,"watchers_count":10,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":4,"forks":25,"open_issues":4,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yast/yast-yast2/pulls/380"},"html":{"href":"https://github.com/yast/yast-yast2/pull/380"},"issue":{"href":"https://api.github.com/repos/yast/yast-yast2/issues/380"},"comments":{"href":"https://api.github.com/repos/yast/yast-yast2/issues/380/comments"},"review_comments":{"href":"https://api.github.com/repos/yast/yast-yast2/pulls/380/comments"},"review_comment":{"href":"https://api.github.com/repos/yast/yast-yast2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yast/yast-yast2/pulls/380/commits"},"statuses":{"href":"https://api.github.com/repos/yast/yast-yast2/statuses/97df31ae9f0ffa6f350e3f7b53537b6b7ff70867"}}}}