{"action":"created","comment":{"url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments/72077269","id":72077269,"diff_hunk":"@@ -150,6 +150,32 @@\n     'TEST_DIR',\n )\n \n+def determine_github_base():\n+    # pick a base\n+    try:\n+        # see where we get master from, e.g. origin\n+        get_remote_command = [\"git\", \"config\", \"--local\", \"--get\", \"branch.master.remote\"]\n+        remote = subprocess.Popen(get_remote_command, stdout=subprocess.PIPE, cwd=TEST_DIR).communicate()[0].strip()\n+        # see if we have a git checkout - it can be in https or ssh format\n+        formats = [","path":"test/common/testinfra.py","position":11,"original_position":11,"commit_id":"1b16d3e9c2eeae36dd6017707215817c18075389","original_commit_id":"1b16d3e9c2eeae36dd6017707215817c18075389","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":"> Why don't we use [ \"git\", \"ls-remote\", \"--get-url\", remote ] instead of all of the screen scraping and regular expressions?\r\n\r\nGood point, we can use that to simplify the regular expressions. We can't get rid of it entirely though, since we need to extract the GitHub API path from the url.","created_at":"2016-07-25T14:48:24Z","updated_at":"2016-07-25T14:48:24Z","html_url":"https://github.com/cockpit-project/cockpit/pull/4760#discussion_r72077269","pull_request_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4760","_links":{"self":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/comments/72077269"},"html":{"href":"https://github.com/cockpit-project/cockpit/pull/4760#discussion_r72077269"},"pull_request":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4760"}}},"pull_request":{"url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4760","id":77965242,"html_url":"https://github.com/cockpit-project/cockpit/pull/4760","diff_url":"https://github.com/cockpit-project/cockpit/pull/4760.diff","patch_url":"https://github.com/cockpit-project/cockpit/pull/4760.patch","issue_url":"https://api.github.com/repos/cockpit-project/cockpit/issues/4760","number":4760,"state":"open","locked":false,"title":"test: Use more defaults","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":"Use explicit mentions of cockpit-project/cockpit less often and rely on extracting that info from the git checkout where possible.\r\n\r\nShould we use regular expressions for this?","created_at":"2016-07-19T12:14:56Z","updated_at":"2016-07-25T14:48:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"790a2ad7303c9996be2f3aed9256849b5c099f50","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4760/commits","review_comments_url":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4760/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/4760/comments","statuses_url":"https://api.github.com/repos/cockpit-project/cockpit/statuses/1b16d3e9c2eeae36dd6017707215817c18075389","head":{"label":"dperpeet:tests-defaults","ref":"tests-defaults","sha":"1b16d3e9c2eeae36dd6017707215817c18075389","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-25T14:41:41Z","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":25915,"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":"39be0a69e4b03907a947d957afe20d394179677e","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-23T21:12:29Z","pushed_at":"2016-07-25T14:42:07Z","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":37151,"stargazers_count":1652,"watchers_count":1652,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":218,"mirror_url":null,"open_issues_count":414,"forks":218,"open_issues":414,"watchers":1652,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4760"},"html":{"href":"https://github.com/cockpit-project/cockpit/pull/4760"},"issue":{"href":"https://api.github.com/repos/cockpit-project/cockpit/issues/4760"},"comments":{"href":"https://api.github.com/repos/cockpit-project/cockpit/issues/4760/comments"},"review_comments":{"href":"https://api.github.com/repos/cockpit-project/cockpit/pulls/4760/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/4760/commits"},"statuses":{"href":"https://api.github.com/repos/cockpit-project/cockpit/statuses/1b16d3e9c2eeae36dd6017707215817c18075389"}}}}
{"actor":{"display_login":"dperpeet"}}