Skip to content

Commit

Permalink
Merge pull request #9247 from rottencandy/fix/gitlab-host-url
Browse files Browse the repository at this point in the history
Always use http protocol for gitlab host
  • Loading branch information
openshift-merge-robot committed Jun 15, 2021
2 parents 72fbfc8 + b043f30 commit ec8dce1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions frontend/packages/git-service/src/services/gitlab-service.ts
Expand Up @@ -58,11 +58,9 @@ export class GitlabService extends BaseService {
};

getRepoMetadata(): RepoMetadata {
const { name, owner, protocol, resource, full_name: fullName } = GitUrlParse(
this.gitsource.url,
);
const { name, owner, resource, full_name: fullName } = GitUrlParse(this.gitsource.url);
const contextDir = removeLeadingSlash(this.gitsource.contextDir);
const host = `${protocol}://${resource}`;
const host = `https://${resource}`;
return {
repoName: name,
owner,
Expand Down Expand Up @@ -96,7 +94,7 @@ export class GitlabService extends BaseService {
await this.getRepo();
return RepoStatus.Reachable;
} catch (e) {
if (e.response.status === 429) {
if (e.response?.status === 429) {
return RepoStatus.RateLimitExceeded;
}
}
Expand Down

0 comments on commit ec8dce1

Please sign in to comment.