Commit 65a5f6c
committed
Parse nested GitLab group paths in parseRepoUrl
GitLab supports subgroup nesting up to 20 levels, so a remote URL like
`git@gitlab.com:my-org/my-group/my-repo.git` is valid but the existing
`[^/]+/([^/]+?)` regex rejected it and `parseRepoUrl` returned null.
With GitLab MR detection from #72 in play, `sync` then threw
"Repository info is required to sync a release with pull request
references" (src/index.ts:407).
The split mirrors `parseProjectPathName` in linear-app's
common/src/models/IntegrationHelper.ts — owner is the first segment,
name is everything else. That matches how Linear's GitLab webhook
stores `attachment.metadata.repoLogin/repoName`, which is what the
CLI's `repositoryOwner`/`repositoryName` join against during release
sync. The convention is symmetric for single-segment URLs (GitHub,
Bitbucket, simple GitLab), so behavior is unchanged for those.
Adds a regression suite that locks the cross-repo contract by running
`parseRepoUrl` against the literal linear-app split logic.
Fixes #831 parent 9d63f17 commit 65a5f6c
2 files changed
Lines changed: 56 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
194 | 224 | | |
195 | 225 | | |
196 | 226 | | |
| |||
273 | 303 | | |
274 | 304 | | |
275 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
276 | 326 | | |
277 | 327 | | |
278 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
435 | | - | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
436 | 437 | | |
437 | 438 | | |
438 | 439 | | |
| |||
445 | 446 | | |
446 | 447 | | |
447 | 448 | | |
448 | | - | |
449 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
450 | 452 | | |
451 | 453 | | |
452 | 454 | | |
| |||
0 commit comments