Skip to content

Commit

Permalink
[dashboard] Fix rendering of the redirect URI on Git Integrations page
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTugarev authored and roboquat committed Aug 3, 2022
1 parent 367bbc7 commit c31d2fe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/dashboard/src/settings/Integrations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,12 @@ export function GitIntegrationModal(
newHostValue = host.replace("https://", "");
}

// Negative Lookahead (?!\/)
// `\/` matches the character `/`
// "https://foobar:80".replace(/:(?!\/)/, "_")
// => 'https://foobar_80'
newHostValue = host.replace(/:(?!\/)/, "_");

setHost(newHostValue);
setRedirectURL(callbackUrl(newHostValue));
setErrorMessage(undefined);
Expand Down

0 comments on commit c31d2fe

Please sign in to comment.