Commit 47daf90
test(scoring): cover pending-pr-scenarios' ghost-login and case-insensitive matching (#8528)
sameLogin's `value &&` short-circuit exists for PullRequestRecord.authorLogin
being string | null | undefined (ghost/deleted GitHub accounts), and both
helpers lowercase before comparing because GitHub treats owner/repo and logins
case-insensitively while stored values are not guaranteed consistent. Every
existing test passed a concrete, same-cased login, so neither behavior was
pinned.
Adds one case covering all four: null and undefined authorLogin are excluded,
and records differing only in repo-name or login case still match. The mock
returns a review keyed to the requested pull number, so the assertion reads
exactly which records survived the filter.
Closes #8329
Co-authored-by: RealDiligent <nft.gold.eth@gmail.com>1 parent 92737d5 commit 47daf90
1 file changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
451 | 479 | | |
452 | 480 | | |
453 | 481 | | |
| |||
0 commit comments