Commit 3032862
committed
fix(vcs): Handle non-github workflow in find_base_sha
`find_head_sha` supported both Github workflow contexts and 'raw git'
contexts however the matching function `find_base_sha` did not handle
raw git contexts.
Thi updates `find_base_sha` to return the equivalent of:
`git merge-base HEAD origin/HEAD`. For:
```
o---o---o---origin/main
/
---1---o---o---o---foo
```
We return the SHA of 1.1 parent db7606a commit 3032862
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
| 582 | + | |
582 | 583 | | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
583 | 587 | | |
584 | 588 | | |
585 | 589 | | |
586 | 590 | | |
587 | 591 | | |
588 | 592 | | |
| 593 | + | |
589 | 594 | | |
590 | 595 | | |
591 | 596 | | |
| |||
594 | 599 | | |
595 | 600 | | |
596 | 601 | | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
597 | 611 | | |
598 | 612 | | |
599 | 613 | | |
| |||
0 commit comments