Repository navigation
Commit 0c218ff
fix(github): expand pull request context from the merge base
GitHub computes a pull request's patch from the merge base of its base
and head. Expanding hidden lines read the old file at base.sha, which is
the base branch tip and moves on as the base branch gets new commits.
When the base branch had since changed the same file, the expanded old
side no longer matched the patch.
Read the merge base from the compare endpoint and load the old side
there. Page 2 of a compare leaves out the file list. A failed compare
read keeps the base tip, as before. Commit diffs keep their first parent.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 5ffe045 commit 0c218ff
2 files changed
Lines changed: 62 additions & 1 deletion
File tree
- packages/source-control-github/src/server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
| 574 | + | |
574 | 575 | | |
575 | 576 | | |
576 | 577 | | |
| |||
2670 | 2671 | | |
2671 | 2672 | | |
2672 | 2673 | | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
2673 | 2702 | | |
2674 | 2703 | | |
2675 | 2704 | | |
| |||
2699 | 2728 | | |
2700 | 2729 | | |
2701 | 2730 | | |
| 2731 | + | |
2702 | 2732 | | |
2703 | 2733 | | |
2704 | 2734 | | |
| |||
2725 | 2755 | | |
2726 | 2756 | | |
2727 | 2757 | | |
| 2758 | + | |
2728 | 2759 | | |
2729 | 2760 | | |
2730 | 2761 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
890 | 890 | | |
891 | 891 | | |
892 | 892 | | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
893 | 900 | | |
894 | 901 | | |
895 | 902 | | |
| |||
1337 | 1344 | | |
1338 | 1345 | | |
1339 | 1346 | | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
1340 | 1370 | | |
1341 | 1371 | | |
1342 | 1372 | | |
| |||
1367 | 1397 | | |
1368 | 1398 | | |
1369 | 1399 | | |
1370 | | - | |
| 1400 | + | |
1371 | 1401 | | |
1372 | 1402 | | |
1373 | 1403 | | |
| |||
0 commit comments