Skip to content

Commit

Permalink
Fix a small bug in the protocol matching regex for DANGER_GITLAB_HOST
Browse files Browse the repository at this point in the history
  • Loading branch information
beezly committed Dec 13, 2019
1 parent 4f12214 commit 0a8441d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/platforms/gitlab/GitLabAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function getGitLabAPICredentialsFromEnv(env: Env): GitLabAPICredentials {
if (envHost) {
// We used to support DANGER_GITLAB_HOST being just the host e.g. "gitlab.com"
// however it is possible to have a custom host without SSL, ensure we only add the protocol if one is not provided
const protocolRegex = /^http(s)*?:\/\//i
const protocolRegex = /^https?:\/\//i
host = protocolRegex.test(envHost) ? envHost : `https://${envHost}`
}

Expand Down

0 comments on commit 0a8441d

Please sign in to comment.