Repository navigation
Commit e521f05
committed
fix: never accept a partial or stale list of the pull request's commits
- A local range shorter than the payload's commit count is the history
a shallow clone had room for, not the pull request: the API is asked
first, and the local list is kept only when the API cannot answer, as
before.
- An API list is used only when it ends at the payload's head commit. A
force push after the event can leave the same count and other
commits.
- The README names the two fallbacks separately: an unlisted pull
request checks HEAD alone, an unfetched head skips the author checks.
Tests cover both, and the git-missing branch of the head fetch that
Codecov flagged. TestGetPrCommitMessages pins the event to {} so it
never reads the CI run it happens to execute in.1 parent 27de21e commit e521f05
3 files changed
Lines changed: 47 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
503 | | - | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
504 | 508 | | |
505 | 509 | | |
506 | 510 | | |
| |||
511 | 515 | | |
512 | 516 | | |
513 | 517 | | |
514 | | - | |
| 518 | + | |
| 519 | + | |
515 | 520 | | |
516 | 521 | | |
517 | 522 | | |
518 | 523 | | |
519 | 524 | | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | 525 | | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
461 | 467 | | |
462 | 468 | | |
463 | 469 | | |
| |||
502 | 508 | | |
503 | 509 | | |
504 | 510 | | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
505 | 522 | | |
506 | 523 | | |
507 | 524 | | |
| |||
1060 | 1077 | | |
1061 | 1078 | | |
1062 | 1079 | | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
1063 | 1084 | | |
1064 | 1085 | | |
1065 | 1086 | | |
1066 | 1087 | | |
1067 | | - | |
| 1088 | + | |
1068 | 1089 | | |
1069 | 1090 | | |
1070 | 1091 | | |
| |||
1082 | 1103 | | |
1083 | 1104 | | |
1084 | 1105 | | |
| 1106 | + | |
1085 | 1107 | | |
1086 | 1108 | | |
1087 | 1109 | | |
| |||
1095 | 1117 | | |
1096 | 1118 | | |
1097 | 1119 | | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
1098 | 1125 | | |
1099 | 1126 | | |
1100 | 1127 | | |
| |||
0 commit comments