pr-shepherd 2.2.12 → 2.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -401,10 +401,6 @@ async function recordReadyReceipt(key, report, context) {
|
|
|
401
401
|
let summary;
|
|
402
402
|
try {
|
|
403
403
|
raw = await receiptSummaryForReport(key, report, context);
|
|
404
|
-
const fresh = fingerprintRawSummaryPr(raw);
|
|
405
|
-
if (fresh === null)
|
|
406
|
-
return failed("fresh summary has no fingerprint");
|
|
407
|
-
fingerprint = fresh;
|
|
408
404
|
if (raw.state !== "OPEN")
|
|
409
405
|
return failed(`fresh summary shows PR ${raw.state}, not OPEN`);
|
|
410
406
|
if (raw.isDraft)
|
|
@@ -413,8 +409,13 @@ async function recordReadyReceipt(key, report, context) {
|
|
|
413
409
|
return failed(`head moved (report ${short(report.headSha)}, fresh ${short(raw.headRefOid)})`);
|
|
414
410
|
if (raw.baseRefOid !== report.baseRefOid)
|
|
415
411
|
return failed(`base moved (report ${short(report.baseRefOid)}, fresh ${short(raw.baseRefOid)})`);
|
|
416
|
-
// Summarize hydrates annotation totals onto the snapshot
|
|
412
|
+
// Summarize hydrates annotation totals onto the snapshot; hash only after,
|
|
413
|
+
// so the stored hash matches the stack side's (which hashes hydrated evidence).
|
|
417
414
|
summary = await summarizePollSummaryPr(raw, { owner: key.owner, name: key.repo }, { stackPrNumber: report.pr });
|
|
415
|
+
const fresh = fingerprintRawSummaryPr(raw);
|
|
416
|
+
if (fresh === null)
|
|
417
|
+
return failed("fresh summary has no fingerprint");
|
|
418
|
+
fingerprint = fresh;
|
|
418
419
|
}
|
|
419
420
|
catch (e) {
|
|
420
421
|
// The receipt is supplementary evidence. A transient summary fetch failure
|
package/package.json
CHANGED