{"action":"created","comment":{"url":"https://api.github.com/repos/translate/pootle/pulls/comments/127482152","pull_request_review_id":50075774,"id":127482152,"diff_hunk":"@@ -294,11 +294,63 @@ def adjust_installation_command():\n                 else:\n                     readme_lines[ln] = \"  pip install Pootle\\n\"\n \n+    def replace_urls():\n+        from pootle.core.utils import version\n+        branch_escape = version.get_git_branch().replace('/', '%2F')\n+        for ln, line in enumerate(readme_lines):\n+            for pattern, replace, rewrite_type in (\n+                # Release Notes\n+                ('releases/[0-9]\\.[0-9]\\.[0-9]\\.html', 'releases/%s.html' %\n+                 version.get_main_version(), 'all'),\n+                # Adjust docs away from /latest/\n+                ('/pootle/en/latest/', '/pootle/en/%s/' %\n+                 version.get_rtd_version(), 'branch'),\n+                # Coverage - Codecov for branches\n+                ('codecov.io/gh/translate/pootle/branch/master',\n+                 'codecov.io/gh/translate/pootle/branch/%s' % branch_escape,\n+                 'branch'),\n+                ('shields.io/codecov/c/github/translate/pootle/master',\n+                 'shields.io/codecov/c/github/translate/pootle/%s' %\n+                 branch_escape, 'branch'),\n+                # Coverage - Coveralls for tags\n+                ('codecov.io/gh/translate/pootle/branch/master',\n+                 'coveralls.io/github/translate/pootle?branch=%s' %\n+                 version.get_version(), 'tag'),\n+                ('shields.io/codecov/c/github/translate/pootle/master',\n+                 'shields.io/coveralls/translate/pootle/%s' %\n+                 version.get_version(), 'tag'),\n+                # Travis - change only the badge, can't link to branch\n+                ('travis/translate/pootle/master', 'travis/translate/pootle/%s'\n+                 % version.get_git_branch(), 'branch'),\n+                ('travis/translate/pootle/master', 'travis/translate/pootle/%s'\n+                 % version.get_version(), 'tag'),\n+                # Landscape\n+                ('landscape.io/github/translate/pootle/master',\n+                 'landscape.io/github/translate/pootle/%s' %\n+                 version.get_git_branch(), 'branch'),\n+                # Requires.io\n+                ('requires/github/translate/pootle/master',\n+                 'requires/github/translate/pootle/%s' %\n+                 version.get_git_branch(), 'branch'),\n+                ('requirements/\\?branch=master', 'requirements/?branch=%s' %\n+                 branch_escape, 'branch'),\n+                ('https://img.shields.io/requires/.*',\n+                 'https://requires.io/github/translate/pootle/requirements.svg?tag=%s'\n+                 % version.get_version(), 'tag'),\n+                ('requirements/\\?branch=master', 'requirements/?tag=%s' %\n+                 version.get_version(), 'tag'),\n+            ):","path":"setup.py","position":110,"original_position":58,"commit_id":"76edf14a69908657d8d60f52738d5431c48128e9","original_commit_id":"8f9012c56e5db470eabdbe405fb211b4d01519b1","user":{"login":"unho","id":939880,"avatar_url":"https://avatars5.githubusercontent.com/u/939880?v=4","gravatar_id":"","url":"https://api.github.com/users/unho","html_url":"https://github.com/unho","followers_url":"https://api.github.com/users/unho/followers","following_url":"https://api.github.com/users/unho/following{/other_user}","gists_url":"https://api.github.com/users/unho/gists{/gist_id}","starred_url":"https://api.github.com/users/unho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unho/subscriptions","organizations_url":"https://api.github.com/users/unho/orgs","repos_url":"https://api.github.com/users/unho/repos","events_url":"https://api.github.com/users/unho/events{/privacy}","received_events_url":"https://api.github.com/users/unho/received_events","type":"User","site_admin":false},"body":"Nit: put this tuple of tuples out of the `for` loops to increase code readability.","created_at":"2017-07-14T15:23:14Z","updated_at":"2017-07-14T15:23:14Z","html_url":"https://github.com/translate/pootle/pull/6569#discussion_r127482152","pull_request_url":"https://api.github.com/repos/translate/pootle/pulls/6569","_links":{"self":{"href":"https://api.github.com/repos/translate/pootle/pulls/comments/127482152"},"html":{"href":"https://github.com/translate/pootle/pull/6569#discussion_r127482152"},"pull_request":{"href":"https://api.github.com/repos/translate/pootle/pulls/6569"}}},"pull_request":{"url":"https://api.github.com/repos/translate/pootle/pulls/6569","id":130610859,"html_url":"https://github.com/translate/pootle/pull/6569","diff_url":"https://github.com/translate/pootle/pull/6569.diff","patch_url":"https://github.com/translate/pootle/pull/6569.patch","issue_url":"https://api.github.com/repos/translate/pootle/issues/6569","number":6569,"state":"open","locked":false,"title":"README updater","user":{"login":"dwaynebailey","id":647438,"avatar_url":"https://avatars5.githubusercontent.com/u/647438?v=4","gravatar_id":"","url":"https://api.github.com/users/dwaynebailey","html_url":"https://github.com/dwaynebailey","followers_url":"https://api.github.com/users/dwaynebailey/followers","following_url":"https://api.github.com/users/dwaynebailey/following{/other_user}","gists_url":"https://api.github.com/users/dwaynebailey/gists{/gist_id}","starred_url":"https://api.github.com/users/dwaynebailey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwaynebailey/subscriptions","organizations_url":"https://api.github.com/users/dwaynebailey/orgs","repos_url":"https://api.github.com/users/dwaynebailey/repos","events_url":"https://api.github.com/users/dwaynebailey/events{/privacy}","received_events_url":"https://api.github.com/users/dwaynebailey/received_events","type":"User","site_admin":false},"body":"This:\r\n\r\n* Rewrites output from `--long-description` so that the package will point to release notes, badges, etc that correspond to the Pootle version\r\n* Adds an `update_readme` command that will write with `-w` to README.rst to propose various README changes.\r\n\r\nFixes #5679 ","created_at":"2017-07-14T15:13:12Z","updated_at":"2017-07-14T15:23:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f080cf1f86721e240a11f70bbae01e926fef6f14","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/translate/pootle/pulls/6569/commits","review_comments_url":"https://api.github.com/repos/translate/pootle/pulls/6569/comments","review_comment_url":"https://api.github.com/repos/translate/pootle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/translate/pootle/issues/6569/comments","statuses_url":"https://api.github.com/repos/translate/pootle/statuses/76edf14a69908657d8d60f52738d5431c48128e9","head":{"label":"dwaynebailey:docs/readme-updater2","ref":"docs/readme-updater2","sha":"76edf14a69908657d8d60f52738d5431c48128e9","user":{"login":"dwaynebailey","id":647438,"avatar_url":"https://avatars5.githubusercontent.com/u/647438?v=4","gravatar_id":"","url":"https://api.github.com/users/dwaynebailey","html_url":"https://github.com/dwaynebailey","followers_url":"https://api.github.com/users/dwaynebailey/followers","following_url":"https://api.github.com/users/dwaynebailey/following{/other_user}","gists_url":"https://api.github.com/users/dwaynebailey/gists{/gist_id}","starred_url":"https://api.github.com/users/dwaynebailey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwaynebailey/subscriptions","organizations_url":"https://api.github.com/users/dwaynebailey/orgs","repos_url":"https://api.github.com/users/dwaynebailey/repos","events_url":"https://api.github.com/users/dwaynebailey/events{/privacy}","received_events_url":"https://api.github.com/users/dwaynebailey/received_events","type":"User","site_admin":false},"repo":{"id":10171405,"name":"pootle","full_name":"dwaynebailey/pootle","owner":{"login":"dwaynebailey","id":647438,"avatar_url":"https://avatars5.githubusercontent.com/u/647438?v=4","gravatar_id":"","url":"https://api.github.com/users/dwaynebailey","html_url":"https://github.com/dwaynebailey","followers_url":"https://api.github.com/users/dwaynebailey/followers","following_url":"https://api.github.com/users/dwaynebailey/following{/other_user}","gists_url":"https://api.github.com/users/dwaynebailey/gists{/gist_id}","starred_url":"https://api.github.com/users/dwaynebailey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwaynebailey/subscriptions","organizations_url":"https://api.github.com/users/dwaynebailey/orgs","repos_url":"https://api.github.com/users/dwaynebailey/repos","events_url":"https://api.github.com/users/dwaynebailey/events{/privacy}","received_events_url":"https://api.github.com/users/dwaynebailey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dwaynebailey/pootle","description":"Online translation tool","fork":true,"url":"https://api.github.com/repos/dwaynebailey/pootle","forks_url":"https://api.github.com/repos/dwaynebailey/pootle/forks","keys_url":"https://api.github.com/repos/dwaynebailey/pootle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dwaynebailey/pootle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dwaynebailey/pootle/teams","hooks_url":"https://api.github.com/repos/dwaynebailey/pootle/hooks","issue_events_url":"https://api.github.com/repos/dwaynebailey/pootle/issues/events{/number}","events_url":"https://api.github.com/repos/dwaynebailey/pootle/events","assignees_url":"https://api.github.com/repos/dwaynebailey/pootle/assignees{/user}","branches_url":"https://api.github.com/repos/dwaynebailey/pootle/branches{/branch}","tags_url":"https://api.github.com/repos/dwaynebailey/pootle/tags","blobs_url":"https://api.github.com/repos/dwaynebailey/pootle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dwaynebailey/pootle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dwaynebailey/pootle/git/refs{/sha}","trees_url":"https://api.github.com/repos/dwaynebailey/pootle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dwaynebailey/pootle/statuses/{sha}","languages_url":"https://api.github.com/repos/dwaynebailey/pootle/languages","stargazers_url":"https://api.github.com/repos/dwaynebailey/pootle/stargazers","contributors_url":"https://api.github.com/repos/dwaynebailey/pootle/contributors","subscribers_url":"https://api.github.com/repos/dwaynebailey/pootle/subscribers","subscription_url":"https://api.github.com/repos/dwaynebailey/pootle/subscription","commits_url":"https://api.github.com/repos/dwaynebailey/pootle/commits{/sha}","git_commits_url":"https://api.github.com/repos/dwaynebailey/pootle/git/commits{/sha}","comments_url":"https://api.github.com/repos/dwaynebailey/pootle/comments{/number}","issue_comment_url":"https://api.github.com/repos/dwaynebailey/pootle/issues/comments{/number}","contents_url":"https://api.github.com/repos/dwaynebailey/pootle/contents/{+path}","compare_url":"https://api.github.com/repos/dwaynebailey/pootle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dwaynebailey/pootle/merges","archive_url":"https://api.github.com/repos/dwaynebailey/pootle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dwaynebailey/pootle/downloads","issues_url":"https://api.github.com/repos/dwaynebailey/pootle/issues{/number}","pulls_url":"https://api.github.com/repos/dwaynebailey/pootle/pulls{/number}","milestones_url":"https://api.github.com/repos/dwaynebailey/pootle/milestones{/number}","notifications_url":"https://api.github.com/repos/dwaynebailey/pootle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dwaynebailey/pootle/labels{/name}","releases_url":"https://api.github.com/repos/dwaynebailey/pootle/releases{/id}","deployments_url":"https://api.github.com/repos/dwaynebailey/pootle/deployments","created_at":"2013-05-20T11:29:39Z","updated_at":"2016-10-23T20:29:10Z","pushed_at":"2017-07-14T15:11:30Z","git_url":"git://github.com/dwaynebailey/pootle.git","ssh_url":"git@github.com:dwaynebailey/pootle.git","clone_url":"https://github.com/dwaynebailey/pootle.git","svn_url":"https://github.com/dwaynebailey/pootle","homepage":"http://pootle.translatehouse.org","size":118918,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"translate:master","ref":"master","sha":"28395abad9b20869464bb5be5445ed3d9a1e34ca","user":{"login":"translate","id":1538178,"avatar_url":"https://avatars6.githubusercontent.com/u/1538178?v=4","gravatar_id":"","url":"https://api.github.com/users/translate","html_url":"https://github.com/translate","followers_url":"https://api.github.com/users/translate/followers","following_url":"https://api.github.com/users/translate/following{/other_user}","gists_url":"https://api.github.com/users/translate/gists{/gist_id}","starred_url":"https://api.github.com/users/translate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/translate/subscriptions","organizations_url":"https://api.github.com/users/translate/orgs","repos_url":"https://api.github.com/users/translate/repos","events_url":"https://api.github.com/users/translate/events{/privacy}","received_events_url":"https://api.github.com/users/translate/received_events","type":"Organization","site_admin":false},"repo":{"id":3769702,"name":"pootle","full_name":"translate/pootle","owner":{"login":"translate","id":1538178,"avatar_url":"https://avatars6.githubusercontent.com/u/1538178?v=4","gravatar_id":"","url":"https://api.github.com/users/translate","html_url":"https://github.com/translate","followers_url":"https://api.github.com/users/translate/followers","following_url":"https://api.github.com/users/translate/following{/other_user}","gists_url":"https://api.github.com/users/translate/gists{/gist_id}","starred_url":"https://api.github.com/users/translate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/translate/subscriptions","organizations_url":"https://api.github.com/users/translate/orgs","repos_url":"https://api.github.com/users/translate/repos","events_url":"https://api.github.com/users/translate/events{/privacy}","received_events_url":"https://api.github.com/users/translate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/translate/pootle","description":"Online translation tool","fork":false,"url":"https://api.github.com/repos/translate/pootle","forks_url":"https://api.github.com/repos/translate/pootle/forks","keys_url":"https://api.github.com/repos/translate/pootle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/translate/pootle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/translate/pootle/teams","hooks_url":"https://api.github.com/repos/translate/pootle/hooks","issue_events_url":"https://api.github.com/repos/translate/pootle/issues/events{/number}","events_url":"https://api.github.com/repos/translate/pootle/events","assignees_url":"https://api.github.com/repos/translate/pootle/assignees{/user}","branches_url":"https://api.github.com/repos/translate/pootle/branches{/branch}","tags_url":"https://api.github.com/repos/translate/pootle/tags","blobs_url":"https://api.github.com/repos/translate/pootle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/translate/pootle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/translate/pootle/git/refs{/sha}","trees_url":"https://api.github.com/repos/translate/pootle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/translate/pootle/statuses/{sha}","languages_url":"https://api.github.com/repos/translate/pootle/languages","stargazers_url":"https://api.github.com/repos/translate/pootle/stargazers","contributors_url":"https://api.github.com/repos/translate/pootle/contributors","subscribers_url":"https://api.github.com/repos/translate/pootle/subscribers","subscription_url":"https://api.github.com/repos/translate/pootle/subscription","commits_url":"https://api.github.com/repos/translate/pootle/commits{/sha}","git_commits_url":"https://api.github.com/repos/translate/pootle/git/commits{/sha}","comments_url":"https://api.github.com/repos/translate/pootle/comments{/number}","issue_comment_url":"https://api.github.com/repos/translate/pootle/issues/comments{/number}","contents_url":"https://api.github.com/repos/translate/pootle/contents/{+path}","compare_url":"https://api.github.com/repos/translate/pootle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/translate/pootle/merges","archive_url":"https://api.github.com/repos/translate/pootle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/translate/pootle/downloads","issues_url":"https://api.github.com/repos/translate/pootle/issues{/number}","pulls_url":"https://api.github.com/repos/translate/pootle/pulls{/number}","milestones_url":"https://api.github.com/repos/translate/pootle/milestones{/number}","notifications_url":"https://api.github.com/repos/translate/pootle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/translate/pootle/labels{/name}","releases_url":"https://api.github.com/repos/translate/pootle/releases{/id}","deployments_url":"https://api.github.com/repos/translate/pootle/deployments","created_at":"2012-03-19T23:06:03Z","updated_at":"2017-07-12T11:12:22Z","pushed_at":"2017-07-14T15:13:13Z","git_url":"git://github.com/translate/pootle.git","ssh_url":"git@github.com:translate/pootle.git","clone_url":"https://github.com/translate/pootle.git","svn_url":"https://github.com/translate/pootle","homepage":"http://pootle.translatehouse.org","size":118664,"stargazers_count":871,"watchers_count":871,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":225,"mirror_url":null,"open_issues_count":494,"forks":225,"open_issues":494,"watchers":871,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/translate/pootle/pulls/6569"},"html":{"href":"https://github.com/translate/pootle/pull/6569"},"issue":{"href":"https://api.github.com/repos/translate/pootle/issues/6569"},"comments":{"href":"https://api.github.com/repos/translate/pootle/issues/6569/comments"},"review_comments":{"href":"https://api.github.com/repos/translate/pootle/pulls/6569/comments"},"review_comment":{"href":"https://api.github.com/repos/translate/pootle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/translate/pootle/pulls/6569/commits"},"statuses":{"href":"https://api.github.com/repos/translate/pootle/statuses/76edf14a69908657d8d60f52738d5431c48128e9"}}}}
{"actor":{"display_login":"unho"}}