chrismdp / rebase-conflicting-pull-requestsA pull request that conflicts with main is rebased onto itPublic · Version 4 of 4#4 · chrismdp · Yesterday 2:28pm · 0.8ShowingLatest#3 · chrismdp · 23 Oct 2026, 9:45am · 0.4#2 · chrismdp · 22 Oct 2026, 5:21pm · 0.4#1 · chrismdp · 22 Oct 2026, 4:01pm · 0.3ForkWho may see each partWhere each part runsYAMLChecksNo mistakespublicanyone who reads the repositorythe pushopen pull requests andGitHub's conflict flag[for each that conflicts][the repository's own][clean][clean][a real conflict]the rebased branch[a clean rebase][within limits]each push, as made[pushed or refused][not a clean rebase][gave up]TriggerA commit lands on mainLinked to chrismdp/issue-to-pull-request#tokenConnectionThe repository, through itsown Actions tokenLinked to chrismdp/issue-to-pull-request#appConnectionThe repository, through itsown GitHub AppGitHub starts CI from the app's push, though not from one by the Actions token, so CI runs on the rebased branch and shows on the pull request. The app's key is a secret only the push step is givenCode · bring-inBring in the open pull requeststhat GitHub flags asconflicting with mainCode · sortSort by rule: is the branch inthis repository, opened by itsown people or the buildworkflow?A fork's pull request, or one opened by a stranger, is never touched, so every commit Claude reads was pushed by the repository's own people. Their text can still steer the session, and what it reaches is one push to their own branch, which CI then judgesData · untrustedThe branch's commits andmain, from gitCode · otherRebase the branch onto mainwith git alone, hooks andfsmonitor off, running nothingfrom the branchDecided by the maintainer: as quick as possible. A clean git rebase is pushed with no Claude session; Claude starts only on a real conflict. CI's reviews still run on the pushed commit, since a resolution is new codeDataMain's rebase prompt andAGENTS.md, copied outbefore the session startsAI · draftResolve the rebase's conflicts,keeping both sides of eachDataThe rebased branch, as abundleCode · sortSort by git alone, runningnothing from the branch: doesit sit on main, with no conflictmarkers and no change to.github/ or Claude Code's ownfiles?Decided in #160's follow-up: the check job goes, but its cheap git-only guards stay in the push job, since they run none of the branch's code and catch a session that pushed something other than a rebaseCode · doForce-push the rebasedbranch with--force-with-lease at thecommit the find step sawThe draft step's token can only read, so it can't push. The push names the commit the find step saw, so GitHub refuses it if anyone pushed meanwhile (awml #26)Person · standing approvalThe maintainer's standingapproval: one force push of arebase onto main to each ofits own people's conflictingbranches, a push to main,accepted by the maintainer in#160, under rule 4The branch's commits can steer the session, so the push goes under a standing approval. It can be undone: the old commit stays on GitHub and the comment names it, so the branch can be put back with one pushOutside actionReplace the pull request'sbranchAskIt pushes and doesn't judge: the check job is gone, and CI runs on the pushed commit. A bad push costs a CI run (#160 rule 4)Code · doOnce it ends, post one newcomment: fixed text saying itwas pushed, with links to theold and new commits, or whyit couldn't be, with Claude'snote escaped: < escaped,mentions broken, lengthcappedOne comment, when it ends, which notifies. Every comment is an outside action, so Claude's text in it is escaped, and the rest is fixed text with links. No status comment edited along the way and no marker for a later run to find (#160 rule 5)SurfaceThe pull request's commitsand thread, where each pushis listedOutside actionComment on the pull requestAllowFlow only+−Fit