{"action":"created","comment":{"url":"https://api.github.com/repos/endlessm/gnome-software/pulls/comments/177995618","pull_request_review_id":107974119,"id":177995618,"diff_hunk":"@@ -1553,3 +1873,191 @@ gs_plugin_add_popular (GsPlugin *plugin,\n \n \treturn TRUE;\n }\n+\n+static GsApp *\n+get_os_upgrade (GsPlugin *plugin)\n+{\n+\tGsPluginData *priv = gs_plugin_get_data (plugin);\n+\tGsApp *app = NULL;\n+\tg_autoptr(AsIcon) ic = NULL;\n+\n+\tif (priv->os_upgrade != NULL)\n+\t\treturn priv->os_upgrade;\n+\n+\t/* use stock icon */\n+\tic = as_icon_new ();\n+\tas_icon_set_kind (ic, AS_ICON_KIND_STOCK);\n+\tas_icon_set_name (ic, \"application-x-addon\");\n+\n+\t/* create the OS upgrade */\n+\tapp = gs_app_new (EOS_UPGRADE_ID);\n+\tgs_app_add_icon (app, ic);\n+\tgs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);\n+\tgs_app_set_kind (app, AS_APP_KIND_OS_UPGRADE);\n+\tgs_app_set_name (app, GS_APP_QUALITY_LOWEST, \"Endless OS\");\n+\tgs_app_set_summary (app, GS_APP_QUALITY_NORMAL,\n+\t\t\t    _(\"A major upgrade, with new features and added \"\n+\t\t\t      \"polish.\"));\n+\tgs_app_set_description (app, GS_APP_QUALITY_LOWEST,\n+\t\t\t\t\"Endless OS\");\n+\tgs_app_add_quirk (app, AS_APP_QUIRK_NEEDS_REBOOT);\n+\tgs_app_add_quirk (app, AS_APP_QUIRK_PROVENANCE);\n+\tgs_app_add_quirk (app, AS_APP_QUIRK_NOT_REVIEWABLE);\n+\tgs_app_set_management_plugin (app, gs_plugin_get_name (plugin));\n+\tgs_app_set_metadata (app, \"GnomeSoftware::UpgradeBanner-css\",\n+\t\t\t     \"background: url('\" DATADIR \"/gnome-software/upgrade-bg.png');\"\n+\t\t\t     \"background-size: 100% 100%;\");\n+\n+\tg_signal_connect_object (priv->updater_proxy, \"notify::state\",\n+\t\t\t\t G_CALLBACK (updater_state_changed), plugin,\n+\t\t\t\t G_CONNECT_SWAPPED);\n+\tg_signal_connect_object (priv->updater_proxy, \"notify::downloaded-bytes\",\n+\t\t\t\t G_CALLBACK (updater_state_changed), plugin,\n+\t\t\t\t G_CONNECT_SWAPPED);\n+\n+\tpriv->os_upgrade = app;\n+\n+\treturn app;\n+}\n+\n+static gboolean\n+should_add_os_upgrade (GsApp *os_upgrade)\n+{\n+\tswitch (gs_app_get_state (os_upgrade)) {","path":"plugins/eos/gs-plugin-eos.c","position":493,"original_position":431,"commit_id":"a5df2954fa97f0de3c426ecce6a677847dcd2406","original_commit_id":"52628bbadf5a3e22fda082b539a0e883c35ae35d","user":{"login":"joaquimrocha","id":1029635,"avatar_url":"https://avatars2.githubusercontent.com/u/1029635?v=4","gravatar_id":"","url":"https://api.github.com/users/joaquimrocha","html_url":"https://github.com/joaquimrocha","followers_url":"https://api.github.com/users/joaquimrocha/followers","following_url":"https://api.github.com/users/joaquimrocha/following{/other_user}","gists_url":"https://api.github.com/users/joaquimrocha/gists{/gist_id}","starred_url":"https://api.github.com/users/joaquimrocha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaquimrocha/subscriptions","organizations_url":"https://api.github.com/users/joaquimrocha/orgs","repos_url":"https://api.github.com/users/joaquimrocha/repos","events_url":"https://api.github.com/users/joaquimrocha/events{/privacy}","received_events_url":"https://api.github.com/users/joaquimrocha/received_events","type":"User","site_admin":false},"body":"Actually I changed my mind and prefer to keep the switch as after changing it, I realize that for this logic it just seems easier to read and to extend if needed later...","created_at":"2018-03-29T09:08:28Z","updated_at":"2018-03-29T09:08:28Z","html_url":"https://github.com/endlessm/gnome-software/pull/336#discussion_r177995618","pull_request_url":"https://api.github.com/repos/endlessm/gnome-software/pulls/336","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/endlessm/gnome-software/pulls/comments/177995618"},"html":{"href":"https://github.com/endlessm/gnome-software/pull/336#discussion_r177995618"},"pull_request":{"href":"https://api.github.com/repos/endlessm/gnome-software/pulls/336"}},"in_reply_to_id":177852700},"pull_request":{"url":"https://api.github.com/repos/endlessm/gnome-software/pulls/336","id":177826383,"html_url":"https://github.com/endlessm/gnome-software/pull/336","diff_url":"https://github.com/endlessm/gnome-software/pull/336.diff","patch_url":"https://github.com/endlessm/gnome-software/pull/336.patch","issue_url":"https://api.github.com/repos/endlessm/gnome-software/issues/336","number":336,"state":"open","locked":false,"title":"T21133","user":{"login":"joaquimrocha","id":1029635,"avatar_url":"https://avatars2.githubusercontent.com/u/1029635?v=4","gravatar_id":"","url":"https://api.github.com/users/joaquimrocha","html_url":"https://github.com/joaquimrocha","followers_url":"https://api.github.com/users/joaquimrocha/followers","following_url":"https://api.github.com/users/joaquimrocha/following{/other_user}","gists_url":"https://api.github.com/users/joaquimrocha/gists{/gist_id}","starred_url":"https://api.github.com/users/joaquimrocha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaquimrocha/subscriptions","organizations_url":"https://api.github.com/users/joaquimrocha/orgs","repos_url":"https://api.github.com/users/joaquimrocha/repos","events_url":"https://api.github.com/users/joaquimrocha/events{/privacy}","received_events_url":"https://api.github.com/users/joaquimrocha/received_events","type":"User","site_admin":false},"body":"https://phabricator.endlessm.com/T21133","created_at":"2018-03-27T18:28:19Z","updated_at":"2018-03-29T09:08:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2d26ad656921e75825d59311ba34e6dbc108997","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/endlessm/gnome-software/pulls/336/commits","review_comments_url":"https://api.github.com/repos/endlessm/gnome-software/pulls/336/comments","review_comment_url":"https://api.github.com/repos/endlessm/gnome-software/pulls/comments{/number}","comments_url":"https://api.github.com/repos/endlessm/gnome-software/issues/336/comments","statuses_url":"https://api.github.com/repos/endlessm/gnome-software/statuses/a5df2954fa97f0de3c426ecce6a677847dcd2406","head":{"label":"endlessm:T21133","ref":"T21133","sha":"a5df2954fa97f0de3c426ecce6a677847dcd2406","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars1.githubusercontent.com/u/1930958?v=4","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"repo":{"id":51603051,"name":"gnome-software","full_name":"endlessm/gnome-software","owner":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars1.githubusercontent.com/u/1930958?v=4","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endlessm/gnome-software","description":"Fork of https://git.gnome.org/browse/gnome-software","fork":false,"url":"https://api.github.com/repos/endlessm/gnome-software","forks_url":"https://api.github.com/repos/endlessm/gnome-software/forks","keys_url":"https://api.github.com/repos/endlessm/gnome-software/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/gnome-software/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/gnome-software/teams","hooks_url":"https://api.github.com/repos/endlessm/gnome-software/hooks","issue_events_url":"https://api.github.com/repos/endlessm/gnome-software/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/gnome-software/events","assignees_url":"https://api.github.com/repos/endlessm/gnome-software/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/gnome-software/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/gnome-software/tags","blobs_url":"https://api.github.com/repos/endlessm/gnome-software/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/gnome-software/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/gnome-software/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/gnome-software/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/gnome-software/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/gnome-software/languages","stargazers_url":"https://api.github.com/repos/endlessm/gnome-software/stargazers","contributors_url":"https://api.github.com/repos/endlessm/gnome-software/contributors","subscribers_url":"https://api.github.com/repos/endlessm/gnome-software/subscribers","subscription_url":"https://api.github.com/repos/endlessm/gnome-software/subscription","commits_url":"https://api.github.com/repos/endlessm/gnome-software/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/gnome-software/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/gnome-software/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/gnome-software/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/gnome-software/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/gnome-software/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/gnome-software/merges","archive_url":"https://api.github.com/repos/endlessm/gnome-software/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/gnome-software/downloads","issues_url":"https://api.github.com/repos/endlessm/gnome-software/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/gnome-software/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/gnome-software/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/gnome-software/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/gnome-software/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/gnome-software/releases{/id}","deployments_url":"https://api.github.com/repos/endlessm/gnome-software/deployments","created_at":"2016-02-12T17:04:47Z","updated_at":"2018-03-25T05:25:33Z","pushed_at":"2018-03-28T18:52:51Z","git_url":"git://github.com/endlessm/gnome-software.git","ssh_url":"git@github.com:endlessm/gnome-software.git","clone_url":"https://github.com/endlessm/gnome-software.git","svn_url":"https://github.com/endlessm/gnome-software","homepage":null,"size":31849,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":3,"open_issues":10,"watchers":3,"default_branch":"master"}},"base":{"label":"endlessm:master","ref":"master","sha":"495e22998ed22adee343d7fe95c939aadba4a8b8","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars1.githubusercontent.com/u/1930958?v=4","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"repo":{"id":51603051,"name":"gnome-software","full_name":"endlessm/gnome-software","owner":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars1.githubusercontent.com/u/1930958?v=4","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endlessm/gnome-software","description":"Fork of https://git.gnome.org/browse/gnome-software","fork":false,"url":"https://api.github.com/repos/endlessm/gnome-software","forks_url":"https://api.github.com/repos/endlessm/gnome-software/forks","keys_url":"https://api.github.com/repos/endlessm/gnome-software/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/gnome-software/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/gnome-software/teams","hooks_url":"https://api.github.com/repos/endlessm/gnome-software/hooks","issue_events_url":"https://api.github.com/repos/endlessm/gnome-software/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/gnome-software/events","assignees_url":"https://api.github.com/repos/endlessm/gnome-software/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/gnome-software/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/gnome-software/tags","blobs_url":"https://api.github.com/repos/endlessm/gnome-software/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/gnome-software/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/gnome-software/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/gnome-software/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/gnome-software/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/gnome-software/languages","stargazers_url":"https://api.github.com/repos/endlessm/gnome-software/stargazers","contributors_url":"https://api.github.com/repos/endlessm/gnome-software/contributors","subscribers_url":"https://api.github.com/repos/endlessm/gnome-software/subscribers","subscription_url":"https://api.github.com/repos/endlessm/gnome-software/subscription","commits_url":"https://api.github.com/repos/endlessm/gnome-software/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/gnome-software/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/gnome-software/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/gnome-software/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/gnome-software/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/gnome-software/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/gnome-software/merges","archive_url":"https://api.github.com/repos/endlessm/gnome-software/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/gnome-software/downloads","issues_url":"https://api.github.com/repos/endlessm/gnome-software/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/gnome-software/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/gnome-software/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/gnome-software/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/gnome-software/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/gnome-software/releases{/id}","deployments_url":"https://api.github.com/repos/endlessm/gnome-software/deployments","created_at":"2016-02-12T17:04:47Z","updated_at":"2018-03-25T05:25:33Z","pushed_at":"2018-03-28T18:52:51Z","git_url":"git://github.com/endlessm/gnome-software.git","ssh_url":"git@github.com:endlessm/gnome-software.git","clone_url":"https://github.com/endlessm/gnome-software.git","svn_url":"https://github.com/endlessm/gnome-software","homepage":null,"size":31849,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":3,"open_issues":10,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/endlessm/gnome-software/pulls/336"},"html":{"href":"https://github.com/endlessm/gnome-software/pull/336"},"issue":{"href":"https://api.github.com/repos/endlessm/gnome-software/issues/336"},"comments":{"href":"https://api.github.com/repos/endlessm/gnome-software/issues/336/comments"},"review_comments":{"href":"https://api.github.com/repos/endlessm/gnome-software/pulls/336/comments"},"review_comment":{"href":"https://api.github.com/repos/endlessm/gnome-software/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/endlessm/gnome-software/pulls/336/commits"},"statuses":{"href":"https://api.github.com/repos/endlessm/gnome-software/statuses/a5df2954fa97f0de3c426ecce6a677847dcd2406"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"joaquimrocha"}}