Skip to content

Commit

Permalink
Switch to using vars for hostname in gh resolver.
Browse files Browse the repository at this point in the history
  • Loading branch information
samccone committed Oct 24, 2016
1 parent 0ea1348 commit 5e1d0fe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/resolvers/exotics/github-resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ export default class GitHubResolver extends HostedGitResolver {
}

static getTarballUrl(parts: ExplodedFragment, hash: string): string {
return `https://codeload.github.com/${parts.user}/${parts.repo}/tar.gz/${hash}`;
return `https://codeload.${this.hostname}/${parts.user}/${parts.repo}/tar.gz/${hash}`;
}

static getGitSSHUrl(parts: ExplodedFragment): string {
return `git@github.com:${parts.user}/${parts.repo}.git${parts.hash ? '#' + decodeURIComponent(parts.hash) : ''}`;
return `git@${this.hostname}:${parts.user}/${parts.repo}.git` +
`${parts.hash ? '#' + decodeURIComponent(parts.hash) : ''}`;
}

static getGitHTTPUrl(parts: ExplodedFragment): string {
return `https://github.com/${parts.user}/${parts.repo}.git`;
return `https://${this.hostname}/${parts.user}/${parts.repo}.git`;
}

static getHTTPFileUrl(parts: ExplodedFragment, filename: string, commit: string): string {
Expand Down

0 comments on commit 5e1d0fe

Please sign in to comment.