{"action":"created","comment":{"url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments/70459299","id":70459299,"diff_hunk":"@@ -0,0 +1,416 @@\n+/*\n+ * This file is part of Cockpit.\n+ *\n+ * Copyright (C) 2016 Red Hat, Inc.\n+ *\n+ * Cockpit is free software; you can redistribute it and/or modify it\n+ * under the terms of the GNU Lesser General Public License as published by\n+ * the Free Software Foundation; either version 2.1 of the License, or\n+ * (at your option) any later version.\n+ *\n+ * Cockpit is distributed in the hope that it will be useful, but\n+ * WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public License\n+ * along with Cockpit; If not, see <http://www.gnu.org/licenses/>.\n+ */\n+\n+define([\n+    \"jquery\",\n+    \"base1/cockpit\",\n+], function($, cockpit) {\n+\n+\"use strict\";\n+\n+var _ = cockpit.gettext;\n+\n+var client = { };\n+\n+client.subscriptionStatus = {\n+    serviceStatus: undefined,\n+    status: undefined,\n+    products: [],\n+    error: undefined,\n+};\n+\n+// callback that is used to notify when data has changed\n+var updateCallback;\n+\n+// DBUS service\n+var service;\n+\n+var needRender = function() {\n+    if (updateCallback)\n+        updateCallback();\n+};\n+\n+/* we trigger status update via dbus\n+ * if we don't get a timely reply, consider subscription-manager failure\n+ */\n+var updateTimeout;\n+\n+/*\n+ * Parses lines like:\n+ *\n+ * id:  text\n+ */\n+var parseSingleSubscription = function(text) {","path":"pkg/subscriptions/subscriptions-client.js","position":59,"original_position":59,"commit_id":"318962cdf012327af68dc9d0c1fec9cbeae7d3a7","original_commit_id":"318962cdf012327af68dc9d0c1fec9cbeae7d3a7","user":{"login":"stefwalter","id":795070,"avatar_url":"https://avatars.githubusercontent.com/u/795070?v=3","gravatar_id":"","url":"https://api.github.com/users/stefwalter","html_url":"https://github.com/stefwalter","followers_url":"https://api.github.com/users/stefwalter/followers","following_url":"https://api.github.com/users/stefwalter/following{/other_user}","gists_url":"https://api.github.com/users/stefwalter/gists{/gist_id}","starred_url":"https://api.github.com/users/stefwalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefwalter/subscriptions","organizations_url":"https://api.github.com/users/stefwalter/orgs","repos_url":"https://api.github.com/users/stefwalter/repos","events_url":"https://api.github.com/users/stefwalter/events{/privacy}","received_events_url":"https://api.github.com/users/stefwalter/received_events","type":"User","site_admin":false},"body":"Should use simpler function form here.","created_at":"2016-07-12T15:14:36Z","updated_at":"2016-07-12T15:14:36Z","html_url":"https://github.com/cockpit-project/cockpit/pull/4715#discussion_r70459299","pull_request_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4715","_links":{"self":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments/70459299"},"html":{"href":"https://github.com/cockpit-project/cockpit/pull/4715#discussion_r70459299"},"pull_request":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4715"}}},"pull_request":{"url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4715","id":77099336,"html_url":"https://github.com/cockpit-project/cockpit/pull/4715","diff_url":"https://github.com/cockpit-project/cockpit/pull/4715.diff","patch_url":"https://github.com/cockpit-project/cockpit/pull/4715.patch","issue_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/4715","number":4715,"state":"open","locked":false,"title":"subscriptions: Add activation keys and port to react","user":{"login":"dperpeet","id":8711649,"avatar_url":"https://avatars.githubusercontent.com/u/8711649?v=3","gravatar_id":"","url":"https://api.github.com/users/dperpeet","html_url":"https://github.com/dperpeet","followers_url":"https://api.github.com/users/dperpeet/followers","following_url":"https://api.github.com/users/dperpeet/following{/other_user}","gists_url":"https://api.github.com/users/dperpeet/gists{/gist_id}","starred_url":"https://api.github.com/users/dperpeet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dperpeet/subscriptions","organizations_url":"https://api.github.com/users/dperpeet/orgs","repos_url":"https://api.github.com/users/dperpeet/repos","events_url":"https://api.github.com/users/dperpeet/events{/privacy}","received_events_url":"https://api.github.com/users/dperpeet/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-12T10:53:19Z","updated_at":"2016-07-12T15:14:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c79df3e091e67d32e2aa485b80b136c111ab7c5a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4715/commits","review_comments_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4715/comments","review_comment_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/4715/comments","statuses_url":"https://api.github.com/repos/cockpit-project/cockpit/statuses/318962cdf012327af68dc9d0c1fec9cbeae7d3a7","head":{"label":"dperpeet:subscription-keys","ref":"subscription-keys","sha":"318962cdf012327af68dc9d0c1fec9cbeae7d3a7","user":{"login":"dperpeet","id":8711649,"avatar_url":"https://avatars.githubusercontent.com/u/8711649?v=3","gravatar_id":"","url":"https://api.github.com/users/dperpeet","html_url":"https://github.com/dperpeet","followers_url":"https://api.github.com/users/dperpeet/followers","following_url":"https://api.github.com/users/dperpeet/following{/other_user}","gists_url":"https://api.github.com/users/dperpeet/gists{/gist_id}","starred_url":"https://api.github.com/users/dperpeet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dperpeet/subscriptions","organizations_url":"https://api.github.com/users/dperpeet/orgs","repos_url":"https://api.github.com/users/dperpeet/repos","events_url":"https://api.github.com/users/dperpeet/events{/privacy}","received_events_url":"https://api.github.com/users/dperpeet/received_events","type":"User","site_admin":false},"repo":{"id":23840026,"name":"cockpit","full_name":"dperpeet/cockpit","owner":{"login":"dperpeet","id":8711649,"avatar_url":"https://avatars.githubusercontent.com/u/8711649?v=3","gravatar_id":"","url":"https://api.github.com/users/dperpeet","html_url":"https://github.com/dperpeet","followers_url":"https://api.github.com/users/dperpeet/followers","following_url":"https://api.github.com/users/dperpeet/following{/other_user}","gists_url":"https://api.github.com/users/dperpeet/gists{/gist_id}","starred_url":"https://api.github.com/users/dperpeet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dperpeet/subscriptions","organizations_url":"https://api.github.com/users/dperpeet/orgs","repos_url":"https://api.github.com/users/dperpeet/repos","events_url":"https://api.github.com/users/dperpeet/events{/privacy}","received_events_url":"https://api.github.com/users/dperpeet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dperpeet/cockpit","description":"Cockpit, a user interface for GNU/Linux servers","fork":true,"url":"https://api.github.com/repos/dperpeet/cockpit","forks_url":"https://api.github.com/repos/dperpeet/cockpit/forks","keys_url":"https://api.github.com/repos/dperpeet/cockpit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dperpeet/cockpit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dperpeet/cockpit/teams","hooks_url":"https://api.github.com/repos/dperpeet/cockpit/hooks","issue_events_url":"https://api.github.com/repos/dperpeet/cockpit/issues/events{/number}","events_url":"https://api.github.com/repos/dperpeet/cockpit/events","assignees_url":"https://api.github.com/repos/dperpeet/cockpit/assignees{/user}","branches_url":"https://api.github.com/repos/dperpeet/cockpit/branches{/branch}","tags_url":"https://api.github.com/repos/dperpeet/cockpit/tags","blobs_url":"https://api.github.com/repos/dperpeet/cockpit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dperpeet/cockpit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dperpeet/cockpit/git/refs{/sha}","trees_url":"https://api.github.com/repos/dperpeet/cockpit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dperpeet/cockpit/statuses/{sha}","languages_url":"https://api.github.com/repos/dperpeet/cockpit/languages","stargazers_url":"https://api.github.com/repos/dperpeet/cockpit/stargazers","contributors_url":"https://api.github.com/repos/dperpeet/cockpit/contributors","subscribers_url":"https://api.github.com/repos/dperpeet/cockpit/subscribers","subscription_url":"https://api.github.com/repos/dperpeet/cockpit/subscription","commits_url":"https://api.github.com/repos/dperpeet/cockpit/commits{/sha}","git_commits_url":"https://api.github.com/repos/dperpeet/cockpit/git/commits{/sha}","comments_url":"https://api.github.com/repos/dperpeet/cockpit/comments{/number}","issue_comment_url":"https://api.github.com/repos/dperpeet/cockpit/issues/comments{/number}","contents_url":"https://api.github.com/repos/dperpeet/cockpit/contents/{+path}","compare_url":"https://api.github.com/repos/dperpeet/cockpit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dperpeet/cockpit/merges","archive_url":"https://api.github.com/repos/dperpeet/cockpit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dperpeet/cockpit/downloads","issues_url":"https://api.github.com/repos/dperpeet/cockpit/issues{/number}","pulls_url":"https://api.github.com/repos/dperpeet/cockpit/pulls{/number}","milestones_url":"https://api.github.com/repos/dperpeet/cockpit/milestones{/number}","notifications_url":"https://api.github.com/repos/dperpeet/cockpit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dperpeet/cockpit/labels{/name}","releases_url":"https://api.github.com/repos/dperpeet/cockpit/releases{/id}","deployments_url":"https://api.github.com/repos/dperpeet/cockpit/deployments","created_at":"2014-09-09T15:48:26Z","updated_at":"2016-06-29T12:31:37Z","pushed_at":"2016-07-12T14:57:40Z","git_url":"git://github.com/dperpeet/cockpit.git","ssh_url":"git@github.com:dperpeet/cockpit.git","clone_url":"https://github.com/dperpeet/cockpit.git","svn_url":"https://github.com/dperpeet/cockpit","homepage":"http://www.cockpit-project.org/","size":25669,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"cockpit-project:master","ref":"master","sha":"3a1a39678f610688f293306ca10d2ebc07ca2263","user":{"login":"cockpit-project","id":5765104,"avatar_url":"https://avatars.githubusercontent.com/u/5765104?v=3","gravatar_id":"","url":"https://api.github.com/users/cockpit-project","html_url":"https://github.com/cockpit-project","followers_url":"https://api.github.com/users/cockpit-project/followers","following_url":"https://api.github.com/users/cockpit-project/following{/other_user}","gists_url":"https://api.github.com/users/cockpit-project/gists{/gist_id}","starred_url":"https://api.github.com/users/cockpit-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockpit-project/subscriptions","organizations_url":"https://api.github.com/users/cockpit-project/orgs","repos_url":"https://api.github.com/users/cockpit-project/repos","events_url":"https://api.github.com/users/cockpit-project/events{/privacy}","received_events_url":"https://api.github.com/users/cockpit-project/received_events","type":"Organization","site_admin":false},"repo":{"id":14049216,"name":"cockpit","full_name":"cockpit-project/cockpit","owner":{"login":"cockpit-project","id":5765104,"avatar_url":"https://avatars.githubusercontent.com/u/5765104?v=3","gravatar_id":"","url":"https://api.github.com/users/cockpit-project","html_url":"https://github.com/cockpit-project","followers_url":"https://api.github.com/users/cockpit-project/followers","following_url":"https://api.github.com/users/cockpit-project/following{/other_user}","gists_url":"https://api.github.com/users/cockpit-project/gists{/gist_id}","starred_url":"https://api.github.com/users/cockpit-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockpit-project/subscriptions","organizations_url":"https://api.github.com/users/cockpit-project/orgs","repos_url":"https://api.github.com/users/cockpit-project/repos","events_url":"https://api.github.com/users/cockpit-project/events{/privacy}","received_events_url":"https://api.github.com/users/cockpit-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cockpit-project/cockpit","description":"Cockpit, a user interface for Linux servers","fork":false,"url":"https://api.github.com/repos/cockpit-project/cockpit","forks_url":"https://api.github.com/repos/cockpit-project/cockpit/forks","keys_url":"https://api.github.com/repos/cockpit-project/cockpit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cockpit-project/cockpit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cockpit-project/cockpit/teams","hooks_url":"https://api.github.com/repos/cockpit-project/cockpit/hooks","issue_events_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/events{/number}","events_url":"https://api.github.com/repos/cockpit-project/cockpit/events","assignees_url":"https://api.github.com/repos/cockpit-project/cockpit/assignees{/user}","branches_url":"https://api.github.com/repos/cockpit-project/cockpit/branches{/branch}","tags_url":"https://api.github.com/repos/cockpit-project/cockpit/tags","blobs_url":"https://api.github.com/repos/cockpit-project/cockpit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cockpit-project/cockpit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cockpit-project/cockpit/git/refs{/sha}","trees_url":"https://api.github.com/repos/cockpit-project/cockpit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cockpit-project/cockpit/statuses/{sha}","languages_url":"https://api.github.com/repos/cockpit-project/cockpit/languages","stargazers_url":"https://api.github.com/repos/cockpit-project/cockpit/stargazers","contributors_url":"https://api.github.com/repos/cockpit-project/cockpit/contributors","subscribers_url":"https://api.github.com/repos/cockpit-project/cockpit/subscribers","subscription_url":"https://api.github.com/repos/cockpit-project/cockpit/subscription","commits_url":"https://api.github.com/repos/cockpit-project/cockpit/commits{/sha}","git_commits_url":"https://api.github.com/repos/cockpit-project/cockpit/git/commits{/sha}","comments_url":"https://api.github.com/repos/cockpit-project/cockpit/comments{/number}","issue_comment_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/comments{/number}","contents_url":"https://api.github.com/repos/cockpit-project/cockpit/contents/{+path}","compare_url":"https://api.github.com/repos/cockpit-project/cockpit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cockpit-project/cockpit/merges","archive_url":"https://api.github.com/repos/cockpit-project/cockpit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cockpit-project/cockpit/downloads","issues_url":"https://api.github.com/repos/cockpit-project/cockpit/issues{/number}","pulls_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls{/number}","milestones_url":"https://api.github.com/repos/cockpit-project/cockpit/milestones{/number}","notifications_url":"https://api.github.com/repos/cockpit-project/cockpit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cockpit-project/cockpit/labels{/name}","releases_url":"https://api.github.com/repos/cockpit-project/cockpit/releases{/id}","deployments_url":"https://api.github.com/repos/cockpit-project/cockpit/deployments","created_at":"2013-11-01T17:36:46Z","updated_at":"2016-07-11T02:58:17Z","pushed_at":"2016-07-12T15:11:14Z","git_url":"git://github.com/cockpit-project/cockpit.git","ssh_url":"git@github.com:cockpit-project/cockpit.git","clone_url":"https://github.com/cockpit-project/cockpit.git","svn_url":"https://github.com/cockpit-project/cockpit","homepage":"http://www.cockpit-project.org/","size":36935,"stargazers_count":1644,"watchers_count":1644,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":216,"mirror_url":null,"open_issues_count":418,"forks":216,"open_issues":418,"watchers":1644,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4715"},"html":{"href":"https://github.com/cockpit-project/cockpit/pull/4715"},"issue":{"href":"https://api.github.com/repos/cockpit-project/cockpit/issues/4715"},"comments":{"href":"https://api.github.com/repos/cockpit-project/cockpit/issues/4715/comments"},"review_comments":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4715/comments"},"review_comment":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4715/commits"},"statuses":{"href":"https://api.github.com/repos/cockpit-project/cockpit/statuses/318962cdf012327af68dc9d0c1fec9cbeae7d3a7"}}}}
{"actor":{"display_login":"stefwalter"}}