Fix externalURLs alert logic
Created by: felixfbecker
Fixes https://github.com/sourcegraph/customer/issues/118
The issue was that the code assumed the array always had an element, but it doesn't need to have. I also noticed that we didn't check whether we actually support the code host. With this PR, we take the first code host from external links that we support, and show nothing if there is none.
cc @dadlerj
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #14980 into main will increase coverage by
0.00%
. The diff coverage is100.00%
.@@ Coverage Diff @@ ## main #14980 +/- ## ======================================= Coverage 52.34% 52.34% ======================================= Files 1556 1556 Lines 79540 79550 +10 Branches 7137 7044 -93 ======================================= + Hits 41635 41642 +7 - Misses 34157 34159 +2 - Partials 3748 3749 +1
Flag Coverage Δ #go 52.30% <ø> (-0.01%)
#integration 30.32% <6.25%> (-0.02%)
#storybook 25.82% <93.75%> (+0.04%)
#typescript 52.44% <100.00%> (+0.02%)
#unit 34.12% <100.00%> (+0.02%)
Impacted Files Coverage Δ .../src/repo/actions/InstallBrowserExtensionAlert.tsx 100.00% <100.00%> (ø)
.../internal/codeintel/resolvers/graphql/locations.go 83.50% <0.00%> (-2.07%)
cmd/repo-updater/repos/types.go 74.20% <0.00%> (-0.25%)
Please register or sign in to reply