{"action":"created","comment":{"url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/comments/178546630","pull_request_review_id":108618538,"id":178546630,"diff_hunk":"@@ -0,0 +1,310 @@\n+#!/usr/bin/env python3\n+\n+\"\"\"\n+This CLI tool is used to detect and show any duplicate articles\n+in the `shard_dir` provided or the app manifest (if available).\n+\n+Examples:\n+\n+    $ ./shard_doctor\n+    $ ./shard_doctor /path/to/shards\n+\"\"\"\n+\n+import argparse\n+import configparser\n+import difflib\n+import gi\n+import itertools\n+import json\n+import os\n+import sys\n+\n+gi.require_version('EosShard', '0')\n+from gi.repository import EosShard\n+\n+CURRENT_DIR = os.getcwd()\n+\n+FLATPAK_INFO = '/.flatpak-info'\n+\n+COLORS = {\n+    'cyan': '\\033[36m',\n+    'green': '\\033[32m',\n+    'red': '\\033[31m',\n+    'reset': '\\033[0m',\n+}\n+\n+\n+def find_app_manifest():\n+    \"\"\"\n+    Finds the app manifest if it is available to the current\n+    runtime or environment that you are running in.\n+\n+    :returns: Path to the manifest, if available. None otherwise.\n+\n+    \"\"\"\n+    running_in_flatpak = os.path.isfile(FLATPAK_INFO)\n+    if not running_in_flatpak:","path":"tools/shard_doctor","position":46,"original_position":46,"commit_id":"378dea27b4a44957759886ac0febd128f1e69381","original_commit_id":"378dea27b4a44957759886ac0febd128f1e69381","user":{"login":"sgnn7","id":175811,"avatar_url":"https://avatars2.githubusercontent.com/u/175811?v=4","gravatar_id":"","url":"https://api.github.com/users/sgnn7","html_url":"https://github.com/sgnn7","followers_url":"https://api.github.com/users/sgnn7/followers","following_url":"https://api.github.com/users/sgnn7/following{/other_user}","gists_url":"https://api.github.com/users/sgnn7/gists{/gist_id}","starred_url":"https://api.github.com/users/sgnn7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgnn7/subscriptions","organizations_url":"https://api.github.com/users/sgnn7/orgs","repos_url":"https://api.github.com/users/sgnn7/repos","events_url":"https://api.github.com/users/sgnn7/events{/privacy}","received_events_url":"https://api.github.com/users/sgnn7/received_events","type":"User","site_admin":false},"body":"@ptomato Hmm...how so? We are fine with this returning null and using the specified dir which should be fine outside of the sandbox.","created_at":"2018-04-02T13:47:16Z","updated_at":"2018-04-02T13:47:17Z","html_url":"https://github.com/endlessm/eos-knowledge-lib/pull/1621#discussion_r178546630","pull_request_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1621","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/comments/178546630"},"html":{"href":"https://github.com/endlessm/eos-knowledge-lib/pull/1621#discussion_r178546630"},"pull_request":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1621"}},"in_reply_to_id":178195973},"pull_request":{"url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1621","id":178058288,"html_url":"https://github.com/endlessm/eos-knowledge-lib/pull/1621","diff_url":"https://github.com/endlessm/eos-knowledge-lib/pull/1621.diff","patch_url":"https://github.com/endlessm/eos-knowledge-lib/pull/1621.patch","issue_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/1621","number":1621,"state":"closed","locked":false,"title":"Add shard_doctor to tooling","user":{"login":"sgnn7","id":175811,"avatar_url":"https://avatars2.githubusercontent.com/u/175811?v=4","gravatar_id":"","url":"https://api.github.com/users/sgnn7","html_url":"https://github.com/sgnn7","followers_url":"https://api.github.com/users/sgnn7/followers","following_url":"https://api.github.com/users/sgnn7/following{/other_user}","gists_url":"https://api.github.com/users/sgnn7/gists{/gist_id}","starred_url":"https://api.github.com/users/sgnn7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgnn7/subscriptions","organizations_url":"https://api.github.com/users/sgnn7/orgs","repos_url":"https://api.github.com/users/sgnn7/repos","events_url":"https://api.github.com/users/sgnn7/events{/privacy}","received_events_url":"https://api.github.com/users/sgnn7/received_events","type":"User","site_admin":false},"body":"This tool can be used to detect duplicate articles in the subscriptions of an app and show its metadata diffs\r\n\r\nhttps://phabricator.endlessm.com/T21652 is the parent story but the PR is more orthogonal to its completion","created_at":"2018-03-28T14:30:29Z","updated_at":"2018-04-02T13:47:17Z","closed_at":"2018-03-30T23:46:27Z","merged_at":"2018-03-30T23:46:27Z","merge_commit_sha":"0c29293ff2c72536c6b9f6969fb21d2f4e696829","assignee":null,"assignees":[],"requested_reviewers":[{"login":"tchx84","id":481418,"avatar_url":"https://avatars0.githubusercontent.com/u/481418?v=4","gravatar_id":"","url":"https://api.github.com/users/tchx84","html_url":"https://github.com/tchx84","followers_url":"https://api.github.com/users/tchx84/followers","following_url":"https://api.github.com/users/tchx84/following{/other_user}","gists_url":"https://api.github.com/users/tchx84/gists{/gist_id}","starred_url":"https://api.github.com/users/tchx84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchx84/subscriptions","organizations_url":"https://api.github.com/users/tchx84/orgs","repos_url":"https://api.github.com/users/tchx84/repos","events_url":"https://api.github.com/users/tchx84/events{/privacy}","received_events_url":"https://api.github.com/users/tchx84/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1621/commits","review_comments_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1621/comments","review_comment_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/1621/comments","statuses_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/statuses/378dea27b4a44957759886ac0febd128f1e69381","head":{"label":"endlessm:T21652","ref":"T21652","sha":"378dea27b4a44957759886ac0febd128f1e69381","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":18152801,"name":"eos-knowledge-lib","full_name":"endlessm/eos-knowledge-lib","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/eos-knowledge-lib","description":"GUI library for knowledge apps","fork":false,"url":"https://api.github.com/repos/endlessm/eos-knowledge-lib","forks_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/forks","keys_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/teams","hooks_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/hooks","issue_events_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/events","assignees_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/tags","blobs_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/languages","stargazers_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/stargazers","contributors_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/contributors","subscribers_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/subscribers","subscription_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/subscription","commits_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/merges","archive_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/downloads","issues_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/releases{/id}","deployments_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/deployments","created_at":"2014-03-26T20:28:39Z","updated_at":"2018-03-30T23:46:31Z","pushed_at":"2018-03-31T00:39:10Z","git_url":"git://github.com/endlessm/eos-knowledge-lib.git","ssh_url":"git@github.com:endlessm/eos-knowledge-lib.git","clone_url":"https://github.com/endlessm/eos-knowledge-lib.git","svn_url":"https://github.com/endlessm/eos-knowledge-lib","homepage":null,"size":43537,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1"},"forks":5,"open_issues":17,"watchers":9,"default_branch":"master"}},"base":{"label":"endlessm:master","ref":"master","sha":"9cb9ca9c072a427e5041fe08aadba6fbf65b0ac3","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":18152801,"name":"eos-knowledge-lib","full_name":"endlessm/eos-knowledge-lib","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/eos-knowledge-lib","description":"GUI library for knowledge apps","fork":false,"url":"https://api.github.com/repos/endlessm/eos-knowledge-lib","forks_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/forks","keys_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/teams","hooks_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/hooks","issue_events_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/events","assignees_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/tags","blobs_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/languages","stargazers_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/stargazers","contributors_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/contributors","subscribers_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/subscribers","subscription_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/subscription","commits_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/merges","archive_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/downloads","issues_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/releases{/id}","deployments_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/deployments","created_at":"2014-03-26T20:28:39Z","updated_at":"2018-03-30T23:46:31Z","pushed_at":"2018-03-31T00:39:10Z","git_url":"git://github.com/endlessm/eos-knowledge-lib.git","ssh_url":"git@github.com:endlessm/eos-knowledge-lib.git","clone_url":"https://github.com/endlessm/eos-knowledge-lib.git","svn_url":"https://github.com/endlessm/eos-knowledge-lib","homepage":null,"size":43537,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1"},"forks":5,"open_issues":17,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1621"},"html":{"href":"https://github.com/endlessm/eos-knowledge-lib/pull/1621"},"issue":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/1621"},"comments":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/1621/comments"},"review_comments":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1621/comments"},"review_comment":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1621/commits"},"statuses":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/statuses/378dea27b4a44957759886ac0febd128f1e69381"}},"author_association":"OWNER"}}
{"actor":{"display_login":"sgnn7"}}