{"action":"created","comment":{"url":"https://api.github.com/repos/endlessm/gnome-software/pulls/comments/87934325","pull_request_review_id":8524466,"id":87934325,"diff_hunk":"@@ -2333,6 +2333,30 @@ gs_flatpak_refine_metadata_from_installation (GsFlatpak *self,\n \treturn TRUE;\n }\n \n+static void\n+ensure_default_branches (GsFlatpak *self)\n+{\n+\tg_autoptr(GPtrArray) xremotes = NULL;\n+\tguint i;\n+\n+\txremotes = flatpak_installation_list_remotes (self->installation, NULL, NULL);\n+\tfor (i = 0; i < xremotes->len; i++) {\n+\t\tFlatpakRemote *xremote = g_ptr_array_index (xremotes, i);\n+\t\tconst gchar *remote_name = flatpak_remote_get_name (xremote);\n+\t\tg_autofree char *default_branch = NULL;\n+\t\tg_autoptr(GError) error_local = NULL;\n+\n+\t\tdefault_branch = flatpak_remote_get_default_branch (xremote);\n+\t\tif (default_branch != NULL)\n+\t\t\tcontinue;\n+\n+\t\tif (!flatpak_installation_update_remote_sync (self->installation, remote_name, NULL, &error_local)) {\n+\t\t\tg_warning (\"failed to update metatada from remote %s: %s\",","path":"src/plugins/gs-flatpak.c","position":23,"original_position":22,"commit_id":"8e93c261c641d65c347653f1f39ffc8c94b06bc5","original_commit_id":"8e93c261c641d65c347653f1f39ffc8c94b06bc5","user":{"login":"mariospr","id":2197259,"avatar_url":"https://avatars.githubusercontent.com/u/2197259?v=3","gravatar_id":"","url":"https://api.github.com/users/mariospr","html_url":"https://github.com/mariospr","followers_url":"https://api.github.com/users/mariospr/followers","following_url":"https://api.github.com/users/mariospr/following{/other_user}","gists_url":"https://api.github.com/users/mariospr/gists{/gist_id}","starred_url":"https://api.github.com/users/mariospr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariospr/subscriptions","organizations_url":"https://api.github.com/users/mariospr/orgs","repos_url":"https://api.github.com/users/mariospr/repos","events_url":"https://api.github.com/users/mariospr/events{/privacy}","received_events_url":"https://api.github.com/users/mariospr/received_events","type":"User","site_admin":false},"body":"ok","created_at":"2016-11-15T01:52:03Z","updated_at":"2016-11-15T01:52:03Z","html_url":"https://github.com/endlessm/gnome-software/pull/141#discussion_r87934325","pull_request_url":"https://api.github.com/repos/endlessm/gnome-software/pulls/141","_links":{"self":{"href":"https://api.github.com/repos/endlessm/gnome-software/pulls/comments/87934325"},"html":{"href":"https://github.com/endlessm/gnome-software/pull/141#discussion_r87934325"},"pull_request":{"href":"https://api.github.com/repos/endlessm/gnome-software/pulls/141"}}},"pull_request":{"url":"https://api.github.com/repos/endlessm/gnome-software/pulls/141","id":92691613,"html_url":"https://github.com/endlessm/gnome-software/pull/141","diff_url":"https://github.com/endlessm/gnome-software/pull/141.diff","patch_url":"https://github.com/endlessm/gnome-software/pull/141.patch","issue_url":"https://api.github.com/repos/endlessm/gnome-software/issues/141","number":141,"state":"open","locked":false,"title":"Handle default branches using flatpak's API only","user":{"login":"mariospr","id":2197259,"avatar_url":"https://avatars.githubusercontent.com/u/2197259?v=3","gravatar_id":"","url":"https://api.github.com/users/mariospr","html_url":"https://github.com/mariospr","followers_url":"https://api.github.com/users/mariospr/followers","following_url":"https://api.github.com/users/mariospr/following{/other_user}","gists_url":"https://api.github.com/users/mariospr/gists{/gist_id}","starred_url":"https://api.github.com/users/mariospr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariospr/subscriptions","organizations_url":"https://api.github.com/users/mariospr/orgs","repos_url":"https://api.github.com/users/mariospr/repos","events_url":"https://api.github.com/users/mariospr/events{/privacy}","received_events_url":"https://api.github.com/users/mariospr/received_events","type":"User","site_admin":false},"body":"Drop the need on our custom system based on the `/etc/gnome-software/flatpak-extra.conf` file and use flatpak's new APIs instead to check the default-branch attribute for a remote, pulling it from the server's summary file when needed.\r\n\r\nhttps://phabricator.endlessm.com/T13403","created_at":"2016-11-08T00:15:02Z","updated_at":"2016-11-15T01:52:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2f4244653edf3d4ab0d56a6ad33c0487dfe5335","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/endlessm/gnome-software/pulls/141/commits","review_comments_url":"https://api.github.com/repos/endlessm/gnome-software/pulls/141/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/141/comments","statuses_url":"https://api.github.com/repos/endlessm/gnome-software/statuses/8e93c261c641d65c347653f1f39ffc8c94b06bc5","head":{"label":"endlessm:T13403","ref":"T13403","sha":"8e93c261c641d65c347653f1f39ffc8c94b06bc5","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","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://avatars.githubusercontent.com/u/1930958?v=3","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":"2016-10-22T07:19:25Z","pushed_at":"2016-11-14T23:34:01Z","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":19117,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"endlessm:master","ref":"master","sha":"167f2bd1be3635d2cc694140ee70d1dc99093f4d","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","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://avatars.githubusercontent.com/u/1930958?v=3","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":"2016-10-22T07:19:25Z","pushed_at":"2016-11-14T23:34:01Z","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":19117,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/endlessm/gnome-software/pulls/141"},"html":{"href":"https://github.com/endlessm/gnome-software/pull/141"},"issue":{"href":"https://api.github.com/repos/endlessm/gnome-software/issues/141"},"comments":{"href":"https://api.github.com/repos/endlessm/gnome-software/issues/141/comments"},"review_comments":{"href":"https://api.github.com/repos/endlessm/gnome-software/pulls/141/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/141/commits"},"statuses":{"href":"https://api.github.com/repos/endlessm/gnome-software/statuses/8e93c261c641d65c347653f1f39ffc8c94b06bc5"}}}}
{"actor":{"display_login":"mariospr"}}