Add backport publish command - #3415
Draft
tianyiy-tim wants to merge 1 commit into
Draft
Conversation
tianyiy-tim
force-pushed
the
add-backport-publish
branch
from
August 10, 2026 18:08
86cc7f5 to
f303452
Compare
tianyiy-tim
force-pushed
the
backport-stack/apply
branch
from
August 10, 2026 18:09
4ef4e67 to
80da763
Compare
tianyiy-tim
force-pushed
the
add-backport-publish
branch
from
August 10, 2026 21:43
f303452 to
ea3a08a
Compare
tianyiy-tim
force-pushed
the
backport-stack/apply
branch
from
August 10, 2026 21:43
80da763 to
a76adef
Compare
tianyiy-tim
force-pushed
the
add-backport-publish
branch
from
August 10, 2026 22:20
ea3a08a to
5f40255
Compare
tianyiy-tim
force-pushed
the
backport-stack/apply
branch
from
August 10, 2026 22:20
a76adef to
e3e0ae2
Compare
tianyiy-tim
force-pushed
the
add-backport-publish
branch
from
August 11, 2026 17:53
5f40255 to
a87a83d
Compare
tianyiy-tim
force-pushed
the
backport-stack/apply
branch
from
August 11, 2026 17:53
e3e0ae2 to
4c1a2b2
Compare
tianyiy-tim
force-pushed
the
add-backport-publish
branch
from
August 12, 2026 16:46
a87a83d to
cefd5e7
Compare
tianyiy-tim
force-pushed
the
backport-stack/apply
branch
from
August 12, 2026 16:46
4c1a2b2 to
55b39ad
Compare
tianyiy-tim
force-pushed
the
add-backport-publish
branch
from
August 13, 2026 18:26
cefd5e7 to
ea6425c
Compare
tianyiy-tim
force-pushed
the
backport-stack/apply
branch
from
August 13, 2026 18:26
55b39ad to
89fe5fe
Compare
tianyiy-tim
force-pushed
the
add-backport-publish
branch
from
August 13, 2026 18:39
ea6425c to
2bd6434
Compare
tianyiy-tim
force-pushed
the
backport-stack/apply
branch
from
August 13, 2026 18:39
89fe5fe to
f3823ea
Compare
tianyiy-tim
force-pushed
the
add-backport-publish
branch
from
August 13, 2026 19:23
2bd6434 to
bf2c1c4
Compare
Pushes the branches apply built and opens one pull request per affected branch, so a fix that lands on seven branches is one command rather than seven trips through the GitHub UI. apply --open-pr offers it as soon as the cherry-picks are done, so a local session stays analyze then apply A branch is publishable once its cherry-pick is finished, which is read from git rather than from anything apply recorded. Resolving a conflict by hand is therefore enough to make the next publish pick that branch up, with no need to run apply again. Whether it carries a pick of its own is measured against the same release ref apply cut it from, so a fork that is behind on the release branches cannot make an empty branch look ready Branches are pushed to a fork and the pull requests are opened against aws/aws-lc. Pushing to aws/aws-lc is refused outright, so a stray --remote cannot put half-reviewed work on the real repository. A branch that already has an open pull request is left alone, so re-running is safe Everything that talks to GitHub lives in util/github.py. The previous version of this tool grew one PR opener in publish and a second in resolve, and they drifted apart --dry-run prints the summary comment instead of posting it. It used to print what it would push and then comment on the source pull request anyway, which is somebody else s pull request and the one thing a dry run must not touch Nothing is ever a draft and nothing is auto-merged
tianyiy-tim
force-pushed
the
add-backport-publish
branch
from
August 17, 2026 17:37
bf2c1c4 to
5dbb56f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues:
Addresses
P425131803Description of changes:
After
applyyou're left with one local branch per affected branch, and opening a pull request for each of them is still manual. For a fix that hits seven branches that's seven trips through the GitHub UI.This pull request adds
publish, which pushes those branches and opens one pull request each, in one command.Most of the time you never type it.
apply --open-proffers to run it as soon as the cherry-picks are done, so a local session staysanalyzethenapply.Stacked on #3414. The base here is
backport-stack/apply, a scaffolding branch holding the commits below it, so this diff is only the 9 files this change touches. I will retarget it tomainas the stack lands. Please don't merge it into the scaffolding branch.Call-outs:
Branches go to your fork, pull requests are opened against
aws/aws-lc. Pushing branches toaws/aws-lcis refused, so a mistyped--remotecan't put half-reviewed work on the real repository.Whether a branch is ready is read from git, not from anything
applyrecorded. So resolving a conflict by hand is enough for the nextpublishto pick that branch up, with no need to runapplyagain. That's the seamresolveuses later.A branch that already has an open pull request is left alone, so re-running is safe.
Nothing is ever a draft and nothing is auto-merged.
Everything that talks to GitHub lives in
util/github.py. The previous version of this tool grew one PR opener inpublishand a second inresolve, and they drifted apart.ghis a new prerequisite, for this command only.Testing:
Unit tests - 26 new, 167 total:
They cover reading a remote URL, the refusal to push to
aws/aws-lc, how a branch is named to GitHub across repos versus within one, and each outcome a branch can end in.Real fix - verified
--remote upstreamis refused before anything is printed or pushed,--dry-runtouches nothing, and that resolving one conflict by hand moved that branch from unfinished to publishable without re-runningapply.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.