Skip to content

Commit

Permalink
fix(platform-server): change repository url
Browse files Browse the repository at this point in the history
fix(platform-server): change repository url

change status endpoint to use the configured repository.api_url

fix #350
  • Loading branch information
jkuri committed Apr 5, 2018
1 parent c0f4429 commit 1c4160b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/commit-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function sendPendingStatus(buildData: any, buildId: number): Promise<void
let sha = buildData.data.after || buildData.data.pull_request &&
buildData.data.pull_request.head.sha || buildData.data.sha;
let name = buildData.repository.full_name;
let gitUrl = `https://api.github.com/repos/${name}/statuses/${sha}`;
let gitUrl = `https://${buildData.repository.api_url || 'api.github.com'}/repos/${name}/statuses/${sha}`;
let abstruseUrl = `${config.url}/build/${buildId}`;

return setGitHubStatusPending(gitUrl, abstruseUrl, buildData.repository.access_token);
Expand Down Expand Up @@ -101,7 +101,7 @@ export function sendFailureStatus(buildData: any, buildId: number): Promise<void
let sha = buildData.data.after || buildData.data.pull_request &&
buildData.data.pull_request.head.sha || buildData.data.sha;
let name = buildData.repository.full_name;
let gitUrl = `https://api.github.com/repos/${name}/statuses/${sha}`;
let gitUrl = `https://${buildData.repository.api_url || 'api.github.com'}/repos/${name}/statuses/${sha}`;
let abstruseUrl = `${config.url}/build/${buildId}`;

return setGitHubStatusFailure(gitUrl, abstruseUrl, buildData.repository.access_token);
Expand Down

0 comments on commit 1c4160b

Please sign in to comment.