You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5a997fb
Browse filesBrowse the repository at this point in the historyBrowse files
feat(release): post an immutable report of every classification and write record version 2
Each run rewrote the batch body whole, so the only account of what a
run found was gone at the next run, and a merged batch kept only its
last one. Nothing said what a classification was made of either: not
the heads it read, the policy, the tool or the flags.
A run now makes a report: every original merged into main since the
line branched, in exactly one category, with what the run read. Its
ID hashes the classification and names no pull request, so a new
batch's report is whole before GitHub numbers the pull request, and a
run that finds the same as the last one makes the same report, which
is posted once and keeps its first bytes. The body carries the latest
report under the record; a comment the tool never edits keeps each
one, so report reads any of them back, from merged batches too.
The comment goes up before the push and the body edit on an open
batch, and after the pull request a new batch opens with the report in
its body; a later run posts a report the body kept but no comment did,
byte for byte, before its own. Every write is preceded by a read of
the pull request, and nothing is written once it is merged or closed.
Both the comment and the body are rendered and measured before the
first write, so an oversized one stops the run with nothing written.
The record becomes version 2: what it was built from, with the run's
--no-workflow-files, which --defer keeps rather than resets, and the
report it goes with.
Assisted-By: LLM
Signed-off-by: Myasnikov Daniil <[email protected]>
returnfmt.Errorf("batch pull request #%d has no %s block, so backport-batch did not write it; merge or close it, and the next run opens a batch of its own", b.pr.Number, deferredFence)
462
497
}
463
-
ifhead==b.lineHead {
498
+
ifp.head==b.lineHead {
464
499
ifrebuilt {
465
-
returnfmt.Errorf("without what is deferred, %s carries nothing beyond %s; close batch pull request #%d instead", branch, b.line.branch(), b.pr.Number)
500
+
returnfmt.Errorf("without what is deferred, %s carries nothing beyond %s; close batch pull request #%d instead", p.branch, b.line.branch(), b.pr.Number)
466
501
}
467
-
returnfmt.Errorf("%s carries nothing beyond %s; nothing to push", branch, b.line.branch())
502
+
returnfmt.Errorf("%s carries nothing beyond %s; nothing to push", p.branch, b.line.branch())
468
503
}
469
504
heads, err:=remoteBatchHeads(b.line)
470
505
iferr!=nil {
471
506
returnerr
472
507
}
473
-
pushed, onRemote:=heads[branch]
508
+
pushed, onRemote:=heads[p.branch]
474
509
lease:=""
475
510
switch {
476
511
caserebuilt:
477
512
if!onRemote||pushed!=b.prHead {
478
-
returnfmt.Errorf("%s on %s is at %.12s, not at %.12s, which the rebuild started from; run again", branch, remote, pushed, b.prHead)
513
+
returnfmt.Errorf("%s on %s is at %.12s, not at %.12s, which the rebuild started from; run again", p.branch, remote, pushed, b.prHead)
template:="<!-- tips -->\n\n## What this PR does\n\n\n### Screenshots\n\n<!-- shots -->\n\n### Downstream repositories\n\n- [ ] No downstream repository is affected by this change\n\n### Release note\n\n```release-note\n\n```\n"
0 commit comments