{"action":"created","issue":{"url":"https://api.github.com/repos/ros-infrastructure/rosinstall_generator/issues/37","repository_url":"https://api.github.com/repos/ros-infrastructure/rosinstall_generator","labels_url":"https://api.github.com/repos/ros-infrastructure/rosinstall_generator/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/ros-infrastructure/rosinstall_generator/issues/37/comments","events_url":"https://api.github.com/repos/ros-infrastructure/rosinstall_generator/issues/37/events","html_url":"https://github.com/ros-infrastructure/rosinstall_generator/pull/37","id":167449151,"number":37,"title":"Change the tarball generator to work with bitbucket and gitlab URLs.","user":{"login":"mikepurvis","id":944666,"avatar_url":"https://avatars.githubusercontent.com/u/944666?v=3","gravatar_id":"","url":"https://api.github.com/users/mikepurvis","html_url":"https://github.com/mikepurvis","followers_url":"https://api.github.com/users/mikepurvis/followers","following_url":"https://api.github.com/users/mikepurvis/following{/other_user}","gists_url":"https://api.github.com/users/mikepurvis/gists{/gist_id}","starred_url":"https://api.github.com/users/mikepurvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikepurvis/subscriptions","organizations_url":"https://api.github.com/users/mikepurvis/orgs","repos_url":"https://api.github.com/users/mikepurvis/repos","events_url":"https://api.github.com/users/mikepurvis/events{/privacy}","received_events_url":"https://api.github.com/users/mikepurvis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-25T19:45:00Z","updated_at":"2016-08-11T18:44:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ros-infrastructure/rosinstall_generator/pulls/37","html_url":"https://github.com/ros-infrastructure/rosinstall_generator/pull/37","diff_url":"https://github.com/ros-infrastructure/rosinstall_generator/pull/37.diff","patch_url":"https://github.com/ros-infrastructure/rosinstall_generator/pull/37.patch"},"body":"Since there's no standard scheme for getting a tarball URL from a git repo, this at least generalizes  the github-centric logic to also cover bitbucket and gitlab. Simple tests from our in-house rosdistro:\r\n\r\n```\r\n$ rosinstall_generator actionlib --tar --rosdistro indigo\r\n- tar:\r\n    local-name: actionlib\r\n    uri: https://gitlab.clearpathrobotics.com/gbp/actionlib-gbp/repository/archive.tar.gz?ref=release/indigo/actionlib/1.11.5-1\r\n    version: actionlib-gbp-release-indigo-actionlib-1.11.5-1\r\n$ rosinstall_generator actionlib --tar --rosdistro indigo --upstream-development\r\n- tar:\r\n    local-name: actionlib\r\n    uri: https://github.com/clearpathrobotics/actionlib/archive/indigo-devel.tar.gz\r\n    version: actionlib-indigo-devel\r\n$ rosinstall_generator cpr_navigation --tar --rosdistro indigo\r\n- tar:\r\n    local-name: cpr_navigation/cpr_navigation\r\n    uri: https://bitbucket.org/clearpathrobotics/cpr_navigation-gbp/get/release/indigo/cpr_navigation/2.0.6-0.tar.gz\r\n    version: cpr_navigation-gbp-release-indigo-cpr_navigation-2.0.6-0\r\n```\r\n\r\nTo confirm the failure path, I manually mutated a local copy of my indigo cache, and got:\r\n\r\n```\r\n$ rosinstall_generator actionlib --tar --rosdistro indigo > foo.txt\r\nTarball requested for repo actionlib, but git server gatlab.clearpathrobotics.com is unrecognized.\r\nFalling back on git clone for repo actionlib\r\n$ cat foo.txt\r\n- git:\r\n    local-name: actionlib\r\n    uri: git@gatlab.clearpathrobotics.com:gbp/actionlib-gbp.git\r\n    version: release/indigo/actionlib/1.11.5-1\r\n```\r\n\r\nOnce https://github.com/ros-infrastructure/rosdistro/pull/79 eventually merges, this could be refactored to take advantage of `RepositorySpecification.VCS_REGEX`, but it's only a small savings, so I think I'd rather get this in now than wait for that."},"comment":{"url":"https://api.github.com/repos/ros-infrastructure/rosinstall_generator/issues/comments/239253242","html_url":"https://github.com/ros-infrastructure/rosinstall_generator/pull/37#issuecomment-239253242","issue_url":"https://api.github.com/repos/ros-infrastructure/rosinstall_generator/issues/37","id":239253242,"user":{"login":"mikepurvis","id":944666,"avatar_url":"https://avatars.githubusercontent.com/u/944666?v=3","gravatar_id":"","url":"https://api.github.com/users/mikepurvis","html_url":"https://github.com/mikepurvis","followers_url":"https://api.github.com/users/mikepurvis/followers","following_url":"https://api.github.com/users/mikepurvis/following{/other_user}","gists_url":"https://api.github.com/users/mikepurvis/gists{/gist_id}","starred_url":"https://api.github.com/users/mikepurvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikepurvis/subscriptions","organizations_url":"https://api.github.com/users/mikepurvis/orgs","repos_url":"https://api.github.com/users/mikepurvis/repos","events_url":"https://api.github.com/users/mikepurvis/events{/privacy}","received_events_url":"https://api.github.com/users/mikepurvis/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T18:44:05Z","updated_at":"2016-08-11T18:44:05Z","body":"Ping"}}
{"actor":{"display_login":"mikepurvis"}}