Repository navigation
Commit d3014c3
fix(server): compare the only remote's host the way the provider's context does
The GH_REPO check compared the provider's locator host, which keeps an
HTTPS port, with the remote's normalized key, which drops it. A remote at
https://github.example.com:8443/contributor/demo with the same URL in
GH_REPO was classed as a fork, and the open same-repository PR was missed.
The remote's host now comes from the same source as the provider's
context: the base URL detectSourceControlProviderFromGitRemoteUrl gives,
read with `new URL`. An HTTPS remote keeps a non-default port, `:443`
drops, and an SSH remote uses its hostname. The GH_REPO host is read the
same way, so `host:443` matches the plain host and a different port stays
a fork.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 91d1444 commit d3014c3
2 files changed
Lines changed: 93 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4472 | 4472 | | |
4473 | 4473 | | |
4474 | 4474 | | |
4475 | | - | |
4476 | | - | |
| 4475 | + | |
| 4476 | + | |
| 4477 | + | |
| 4478 | + | |
| 4479 | + | |
| 4480 | + | |
| 4481 | + | |
| 4482 | + | |
| 4483 | + | |
4477 | 4484 | | |
4478 | | - | |
4479 | | - | |
| 4485 | + | |
| 4486 | + | |
4480 | 4487 | | |
4481 | 4488 | | |
4482 | 4489 | | |
4483 | 4490 | | |
4484 | 4491 | | |
4485 | 4492 | | |
4486 | 4493 | | |
4487 | | - | |
4488 | | - | |
4489 | | - | |
4490 | | - | |
4491 | | - | |
4492 | | - | |
| 4494 | + | |
4493 | 4495 | | |
4494 | 4496 | | |
4495 | 4497 | | |
| |||
4613 | 4615 | | |
4614 | 4616 | | |
4615 | 4617 | | |
| 4618 | + | |
| 4619 | + | |
| 4620 | + | |
| 4621 | + | |
| 4622 | + | |
| 4623 | + | |
| 4624 | + | |
| 4625 | + | |
| 4626 | + | |
| 4627 | + | |
| 4628 | + | |
| 4629 | + | |
| 4630 | + | |
| 4631 | + | |
| 4632 | + | |
| 4633 | + | |
| 4634 | + | |
| 4635 | + | |
| 4636 | + | |
| 4637 | + | |
| 4638 | + | |
| 4639 | + | |
| 4640 | + | |
| 4641 | + | |
| 4642 | + | |
| 4643 | + | |
| 4644 | + | |
| 4645 | + | |
| 4646 | + | |
| 4647 | + | |
| 4648 | + | |
| 4649 | + | |
| 4650 | + | |
| 4651 | + | |
| 4652 | + | |
| 4653 | + | |
| 4654 | + | |
| 4655 | + | |
| 4656 | + | |
| 4657 | + | |
| 4658 | + | |
| 4659 | + | |
| 4660 | + | |
| 4661 | + | |
| 4662 | + | |
| 4663 | + | |
| 4664 | + | |
| 4665 | + | |
| 4666 | + | |
| 4667 | + | |
| 4668 | + | |
| 4669 | + | |
| 4670 | + | |
| 4671 | + | |
| 4672 | + | |
4616 | 4673 | | |
4617 | 4674 | | |
4618 | 4675 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
621 | 626 | | |
622 | 627 | | |
623 | 628 | | |
| |||
1376 | 1381 | | |
1377 | 1382 | | |
1378 | 1383 | | |
1379 | | - | |
1380 | | - | |
1381 | | - | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
1382 | 1388 | | |
1383 | 1389 | | |
1384 | 1390 | | |
1385 | | - | |
| 1391 | + | |
1386 | 1392 | | |
1387 | | - | |
1388 | | - | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
1389 | 1400 | | |
1390 | 1401 | | |
1391 | | - | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
1392 | 1407 | | |
1393 | 1408 | | |
1394 | 1409 | | |
1395 | | - | |
| 1410 | + | |
1396 | 1411 | | |
1397 | 1412 | | |
1398 | 1413 | | |
| |||
1424 | 1439 | | |
1425 | 1440 | | |
1426 | 1441 | | |
| 1442 | + | |
1427 | 1443 | | |
1428 | 1444 | | |
1429 | 1445 | | |
| |||
1447 | 1463 | | |
1448 | 1464 | | |
1449 | 1465 | | |
| 1466 | + | |
1450 | 1467 | | |
1451 | 1468 | | |
1452 | 1469 | | |
| |||
1505 | 1522 | | |
1506 | 1523 | | |
1507 | 1524 | | |
1508 | | - | |
| 1525 | + | |
1509 | 1526 | | |
1510 | 1527 | | |
1511 | 1528 | | |
| |||
0 commit comments