Commit fdae9e7
fix: remove trailing slashes from host url to fix links to code host platforms (#915)
* Fix double slash in GitLab and Azure DevOps web URLs
When users configure a GitLab or Azure DevOps connection with a trailing
slash in the URL (e.g., https://gitlab.example.com/), the constructed
project URLs would have a double slash (https://gitlab.example.com//path)
causing 404 errors when opening links.
This fix strips trailing slashes from the hostUrl before constructing URLs.
Fixes SOU-533
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
* Add changelog entry for PR #915
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
* Strip all trailing slashes from host URLs
Changed regex from /\\/$/ to /\\/+$/ to handle cases where
there might be multiple trailing slashes in the configured URL.
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
* remove all trailing slashes for all code host platforms
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>1 parent 92eefde commit fdae9e7
2 files changed
+7
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
727 | | - | |
| 727 | + | |
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
| |||
0 commit comments