Skip to content

merged: a repository deletes its own merged branches - #51

Merged
lneto merged 1 commit into
masterfrom
merged-auto-delete
Nov 27, 2026
Merged

lneto merged 1 commit into
masterfrom
merged-auto-delete

Conversation

@lneto

@lneto lneto commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

After a merge in luainkernel/harness or luainkernel/luaebpf, the merged skill had the session delete the merged branch with git push --delete, which the auto mode classifier refuses in those two repositories, so each batch of merges left the maintainer a script under /tmp to run.

Both repositories now set delete_branch_on_merge, which the maintainer chose on 2026-11-26: GitHub deletes the head branch at the merge and moves the pull requests based on it to the base. Section 4 of the merged skill says so, and makes the remote delete there a check, git ls-remote <url> refs/heads/<head.ref> printing nothing; the checkout's local branch still goes, and luainkernel/lunatik, which does not set it, deletes as before. Nothing a script calls changes.

The auto mode classifier refuses the session's git push --delete of a
merged branch in luainkernel/harness and luainkernel/luaebpf, so each
batch of merges left the maintainer a script under /tmp to run. Both
repositories now set delete_branch_on_merge, D201 C, which the
maintainer took on 2026-11-26 ("201 aceito sua sugestao"): GitHub
deletes the head at the merge and moves the pull requests based on it
to the base, as its changelog of 2020-05-19 says. Section 4 says that
there the remote delete is a check and the checkout's branch still goes.
That the move happens on a merge made through the API is read on the
first pull request stacked under one, by section 2's query.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lneto lneto added the complexity: small One line or one file, with a trivial or existing test label Nov 27, 2026
@lneto

lneto commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Note

This comment was written by an LLM, not a human.

Proof at head 0453dcd, text no command reads.

The setting the new paragraph names, read after the change to the repositories:

$ for r in harness luaebpf lunatik; do gh api repos/luainkernel/$r --jq "\"$r \(.delete_branch_on_merge)\""; done
harness true
luaebpf true
lunatik false

Section 4 of .agents/skills/merged/SKILL.md ended, before:

Its commits are on master under new SHAs, and GitHub keeps the old head as refs/pull/<N>/head. A
delete the session's permissions refuse goes to the maintainer as a script under /tmp and the line
that runs it (AGENTS.md, Deciding what to change).

and now goes on with:

A repository whose delete_branch_on_merge is set, as luainkernel/harness and luainkernel/luaebpf
are, deletes the branch itself at the merge, and GitHub moves the pull requests based on it to the
base (https://github.blog/changelog/2020-05-19-pull-request-retargeting), which section 2's query
shows. There the remote delete is a check, git ls-remote <url> refs/heads/<head.ref> printing
nothing, and the checkout's branch still goes.

A repository that does not set it, luainkernel/lunatik, keeps the session's git push --delete, which passed there today for a claude_ branch. This pull request's own merge is the first read of the setting: its branch, merged-auto-delete, is gone once it merges.

@lneto
lneto merged commit a8826ba into master Nov 27, 2026
1 check passed
@lneto
lneto deleted the merged-auto-delete branch November 27, 2026 02:06
lneto added a commit to luainkernel/lunatik that referenced this pull request Nov 27, 2026
The `harness/` mount moves to luainkernel/harness@a8826ba, which carries
luainkernel/harness#51: section 4 of the merged skill says that a
repository whose delete_branch_on_merge is set, as luainkernel/harness
and luainkernel/luaebpf now are, deletes the merged branch itself, so the
remote delete there is a check and the checkout's branch still goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lneto added a commit to luainkernel/luaebpf that referenced this pull request Nov 27, 2026
The `harness/` mount moves to luainkernel/harness@a8826ba, which carries
luainkernel/harness#51: section 4 of the merged skill says that a
repository whose delete_branch_on_merge is set, as luainkernel/harness
and luainkernel/luaebpf now are, deletes the merged branch itself, so the
remote delete there is a check and the checkout's branch still goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

complexity: small One line or one file, with a trivial or existing test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant