{"action":"created","comment":{"url":"https://api.github.com/repos/nijel/weblate/pulls/comments/28676754","id":28676754,"diff_hunk":"@@ -630,6 +631,75 @@ def push(self, branch):\n \n \n @register_vcs\n+class GithubRepository(GitRepository):\n+\n+    name = 'GitHub'\n+\n+    _cmd = 'hub'\n+    _hub_config_file = os.path.join(os.path.expanduser('~'),\n+                                    '.config/hub')\n+    _hub_user_prefix = '- user: '\n+\n+    _hub_user = None\n+    if 'GITHUB_USER' in os.environ:\n+        _hub_user = os.environ['GITHUB_USER']\n+    elif os.path.isfile(_hub_config_file):","path":"weblate/trans/vcs.py","position":24,"original_position":24,"commit_id":"4f15ec3d9cf5c130c048d124c167870f51c0bb79","original_commit_id":"4f15ec3d9cf5c130c048d124c167870f51c0bb79","user":{"login":"nijel","id":212189,"avatar_url":"https://avatars.githubusercontent.com/u/212189?v=3","gravatar_id":"","url":"https://api.github.com/users/nijel","html_url":"https://github.com/nijel","followers_url":"https://api.github.com/users/nijel/followers","following_url":"https://api.github.com/users/nijel/following{/other_user}","gists_url":"https://api.github.com/users/nijel/gists{/gist_id}","starred_url":"https://api.github.com/users/nijel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nijel/subscriptions","organizations_url":"https://api.github.com/users/nijel/orgs","repos_url":"https://api.github.com/users/nijel/repos","events_url":"https://api.github.com/users/nijel/events{/privacy}","received_events_url":"https://api.github.com/users/nijel/received_events","type":"User","site_admin":false},"body":"...and when having the setting in settings.py, I think this branch can be completely removed.","created_at":"2015-04-20T10:03:22Z","updated_at":"2015-04-20T10:03:22Z","html_url":"https://github.com/nijel/weblate/pull/723#discussion_r28676754","pull_request_url":"https://api.github.com/repos/nijel/weblate/pulls/723","_links":{"self":{"href":"https://api.github.com/repos/nijel/weblate/pulls/comments/28676754"},"html":{"href":"https://github.com/nijel/weblate/pull/723#discussion_r28676754"},"pull_request":{"href":"https://api.github.com/repos/nijel/weblate/pulls/723"}}},"pull_request":{"url":"https://api.github.com/repos/nijel/weblate/pulls/723","id":33601377,"html_url":"https://github.com/nijel/weblate/pull/723","diff_url":"https://github.com/nijel/weblate/pull/723.diff","patch_url":"https://github.com/nijel/weblate/pull/723.patch","issue_url":"https://api.github.com/repos/nijel/weblate/issues/723","number":723,"state":"open","locked":false,"title":"Add GitHub VCS provider.","user":{"login":"fwalch","id":339435,"avatar_url":"https://avatars.githubusercontent.com/u/339435?v=3","gravatar_id":"","url":"https://api.github.com/users/fwalch","html_url":"https://github.com/fwalch","followers_url":"https://api.github.com/users/fwalch/followers","following_url":"https://api.github.com/users/fwalch/following{/other_user}","gists_url":"https://api.github.com/users/fwalch/gists{/gist_id}","starred_url":"https://api.github.com/users/fwalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fwalch/subscriptions","organizations_url":"https://api.github.com/users/fwalch/orgs","repos_url":"https://api.github.com/users/fwalch/repos","events_url":"https://api.github.com/users/fwalch/events{/privacy}","received_events_url":"https://api.github.com/users/fwalch/received_events","type":"User","site_admin":false},"body":"Tries to fix #656. Uses the [`hub`](https://github.com/github/hub) command line tool and requires that is has been set up (either by creating `~/.config/hub` or setting `GITHUB_USERNAME` and `GITHUB_PASSWORD` environment variables). The most complicated part is probably getting the Github username configured for hub out of the config, which is needed because it's also the name of the remote created for the fork (`hub fork`). Maybe there's an easier way?\r\n\r\nI thought about using a Github API module for Python instead of `hub`, but this would probably require some admin functions to manage Github API tokens.. using `hub` should be simpler.\r\n\r\nI didn't test this too much (and didn't yet add any automated tests), but wanted to get some feedback.. so let me know what you think!\r\n\r\nYou can see an example pull request at https://github.com/fwalch/neovim/pull/11.","created_at":"2015-04-18T12:26:30Z","updated_at":"2015-04-20T10:03:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"057d94841239459e7cc58eff80b75f013d8edcde","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nijel/weblate/pulls/723/commits","review_comments_url":"https://api.github.com/repos/nijel/weblate/pulls/723/comments","review_comment_url":"https://api.github.com/repos/nijel/weblate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nijel/weblate/issues/723/comments","statuses_url":"https://api.github.com/repos/nijel/weblate/statuses/4f15ec3d9cf5c130c048d124c167870f51c0bb79","head":{"label":"fwalch:github-pr","ref":"github-pr","sha":"4f15ec3d9cf5c130c048d124c167870f51c0bb79","user":{"login":"fwalch","id":339435,"avatar_url":"https://avatars.githubusercontent.com/u/339435?v=3","gravatar_id":"","url":"https://api.github.com/users/fwalch","html_url":"https://github.com/fwalch","followers_url":"https://api.github.com/users/fwalch/followers","following_url":"https://api.github.com/users/fwalch/following{/other_user}","gists_url":"https://api.github.com/users/fwalch/gists{/gist_id}","starred_url":"https://api.github.com/users/fwalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fwalch/subscriptions","organizations_url":"https://api.github.com/users/fwalch/orgs","repos_url":"https://api.github.com/users/fwalch/repos","events_url":"https://api.github.com/users/fwalch/events{/privacy}","received_events_url":"https://api.github.com/users/fwalch/received_events","type":"User","site_admin":false},"repo":{"id":34157446,"name":"weblate","full_name":"fwalch/weblate","owner":{"login":"fwalch","id":339435,"avatar_url":"https://avatars.githubusercontent.com/u/339435?v=3","gravatar_id":"","url":"https://api.github.com/users/fwalch","html_url":"https://github.com/fwalch","followers_url":"https://api.github.com/users/fwalch/followers","following_url":"https://api.github.com/users/fwalch/following{/other_user}","gists_url":"https://api.github.com/users/fwalch/gists{/gist_id}","starred_url":"https://api.github.com/users/fwalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fwalch/subscriptions","organizations_url":"https://api.github.com/users/fwalch/orgs","repos_url":"https://api.github.com/users/fwalch/repos","events_url":"https://api.github.com/users/fwalch/events{/privacy}","received_events_url":"https://api.github.com/users/fwalch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fwalch/weblate","description":"Web based translation tool with tight version control integration.","fork":true,"url":"https://api.github.com/repos/fwalch/weblate","forks_url":"https://api.github.com/repos/fwalch/weblate/forks","keys_url":"https://api.github.com/repos/fwalch/weblate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fwalch/weblate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fwalch/weblate/teams","hooks_url":"https://api.github.com/repos/fwalch/weblate/hooks","issue_events_url":"https://api.github.com/repos/fwalch/weblate/issues/events{/number}","events_url":"https://api.github.com/repos/fwalch/weblate/events","assignees_url":"https://api.github.com/repos/fwalch/weblate/assignees{/user}","branches_url":"https://api.github.com/repos/fwalch/weblate/branches{/branch}","tags_url":"https://api.github.com/repos/fwalch/weblate/tags","blobs_url":"https://api.github.com/repos/fwalch/weblate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fwalch/weblate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fwalch/weblate/git/refs{/sha}","trees_url":"https://api.github.com/repos/fwalch/weblate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fwalch/weblate/statuses/{sha}","languages_url":"https://api.github.com/repos/fwalch/weblate/languages","stargazers_url":"https://api.github.com/repos/fwalch/weblate/stargazers","contributors_url":"https://api.github.com/repos/fwalch/weblate/contributors","subscribers_url":"https://api.github.com/repos/fwalch/weblate/subscribers","subscription_url":"https://api.github.com/repos/fwalch/weblate/subscription","commits_url":"https://api.github.com/repos/fwalch/weblate/commits{/sha}","git_commits_url":"https://api.github.com/repos/fwalch/weblate/git/commits{/sha}","comments_url":"https://api.github.com/repos/fwalch/weblate/comments{/number}","issue_comment_url":"https://api.github.com/repos/fwalch/weblate/issues/comments{/number}","contents_url":"https://api.github.com/repos/fwalch/weblate/contents/{+path}","compare_url":"https://api.github.com/repos/fwalch/weblate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fwalch/weblate/merges","archive_url":"https://api.github.com/repos/fwalch/weblate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fwalch/weblate/downloads","issues_url":"https://api.github.com/repos/fwalch/weblate/issues{/number}","pulls_url":"https://api.github.com/repos/fwalch/weblate/pulls{/number}","milestones_url":"https://api.github.com/repos/fwalch/weblate/milestones{/number}","notifications_url":"https://api.github.com/repos/fwalch/weblate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fwalch/weblate/labels{/name}","releases_url":"https://api.github.com/repos/fwalch/weblate/releases{/id}","created_at":"2015-04-18T07:51:05Z","updated_at":"2015-04-18T07:51:08Z","pushed_at":"2015-04-18T12:11:22Z","git_url":"git://github.com/fwalch/weblate.git","ssh_url":"git@github.com:fwalch/weblate.git","clone_url":"https://github.com/fwalch/weblate.git","svn_url":"https://github.com/fwalch/weblate","homepage":"http://weblate.org/","size":114120,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"nijel:master","ref":"master","sha":"1c01ed5fd5d07e83da6c98a2400d28cdc70c3896","user":{"login":"nijel","id":212189,"avatar_url":"https://avatars.githubusercontent.com/u/212189?v=3","gravatar_id":"","url":"https://api.github.com/users/nijel","html_url":"https://github.com/nijel","followers_url":"https://api.github.com/users/nijel/followers","following_url":"https://api.github.com/users/nijel/following{/other_user}","gists_url":"https://api.github.com/users/nijel/gists{/gist_id}","starred_url":"https://api.github.com/users/nijel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nijel/subscriptions","organizations_url":"https://api.github.com/users/nijel/orgs","repos_url":"https://api.github.com/users/nijel/repos","events_url":"https://api.github.com/users/nijel/events{/privacy}","received_events_url":"https://api.github.com/users/nijel/received_events","type":"User","site_admin":false},"repo":{"id":3559019,"name":"weblate","full_name":"nijel/weblate","owner":{"login":"nijel","id":212189,"avatar_url":"https://avatars.githubusercontent.com/u/212189?v=3","gravatar_id":"","url":"https://api.github.com/users/nijel","html_url":"https://github.com/nijel","followers_url":"https://api.github.com/users/nijel/followers","following_url":"https://api.github.com/users/nijel/following{/other_user}","gists_url":"https://api.github.com/users/nijel/gists{/gist_id}","starred_url":"https://api.github.com/users/nijel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nijel/subscriptions","organizations_url":"https://api.github.com/users/nijel/orgs","repos_url":"https://api.github.com/users/nijel/repos","events_url":"https://api.github.com/users/nijel/events{/privacy}","received_events_url":"https://api.github.com/users/nijel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nijel/weblate","description":"Web based translation tool with tight version control integration.","fork":false,"url":"https://api.github.com/repos/nijel/weblate","forks_url":"https://api.github.com/repos/nijel/weblate/forks","keys_url":"https://api.github.com/repos/nijel/weblate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nijel/weblate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nijel/weblate/teams","hooks_url":"https://api.github.com/repos/nijel/weblate/hooks","issue_events_url":"https://api.github.com/repos/nijel/weblate/issues/events{/number}","events_url":"https://api.github.com/repos/nijel/weblate/events","assignees_url":"https://api.github.com/repos/nijel/weblate/assignees{/user}","branches_url":"https://api.github.com/repos/nijel/weblate/branches{/branch}","tags_url":"https://api.github.com/repos/nijel/weblate/tags","blobs_url":"https://api.github.com/repos/nijel/weblate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nijel/weblate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nijel/weblate/git/refs{/sha}","trees_url":"https://api.github.com/repos/nijel/weblate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nijel/weblate/statuses/{sha}","languages_url":"https://api.github.com/repos/nijel/weblate/languages","stargazers_url":"https://api.github.com/repos/nijel/weblate/stargazers","contributors_url":"https://api.github.com/repos/nijel/weblate/contributors","subscribers_url":"https://api.github.com/repos/nijel/weblate/subscribers","subscription_url":"https://api.github.com/repos/nijel/weblate/subscription","commits_url":"https://api.github.com/repos/nijel/weblate/commits{/sha}","git_commits_url":"https://api.github.com/repos/nijel/weblate/git/commits{/sha}","comments_url":"https://api.github.com/repos/nijel/weblate/comments{/number}","issue_comment_url":"https://api.github.com/repos/nijel/weblate/issues/comments{/number}","contents_url":"https://api.github.com/repos/nijel/weblate/contents/{+path}","compare_url":"https://api.github.com/repos/nijel/weblate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nijel/weblate/merges","archive_url":"https://api.github.com/repos/nijel/weblate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nijel/weblate/downloads","issues_url":"https://api.github.com/repos/nijel/weblate/issues{/number}","pulls_url":"https://api.github.com/repos/nijel/weblate/pulls{/number}","milestones_url":"https://api.github.com/repos/nijel/weblate/milestones{/number}","notifications_url":"https://api.github.com/repos/nijel/weblate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nijel/weblate/labels{/name}","releases_url":"https://api.github.com/repos/nijel/weblate/releases{/id}","created_at":"2012-02-27T09:33:29Z","updated_at":"2015-04-20T09:21:27Z","pushed_at":"2015-04-20T09:20:35Z","git_url":"git://github.com/nijel/weblate.git","ssh_url":"git@github.com:nijel/weblate.git","clone_url":"https://github.com/nijel/weblate.git","svn_url":"https://github.com/nijel/weblate","homepage":"http://weblate.org/","size":134756,"stargazers_count":258,"watchers_count":258,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":83,"mirror_url":null,"open_issues_count":67,"forks":83,"open_issues":67,"watchers":258,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nijel/weblate/pulls/723"},"html":{"href":"https://github.com/nijel/weblate/pull/723"},"issue":{"href":"https://api.github.com/repos/nijel/weblate/issues/723"},"comments":{"href":"https://api.github.com/repos/nijel/weblate/issues/723/comments"},"review_comments":{"href":"https://api.github.com/repos/nijel/weblate/pulls/723/comments"},"review_comment":{"href":"https://api.github.com/repos/nijel/weblate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nijel/weblate/pulls/723/commits"},"statuses":{"href":"https://api.github.com/repos/nijel/weblate/statuses/4f15ec3d9cf5c130c048d124c167870f51c0bb79"}}}}