Repository navigation
feat(repos): make devops repos worktrees add remove merged worktrees first - #2351
Merged
Merged
Conversation
Plans #2338: add removes the worktrees of merged work before it checks for a holder, and prune keeps the worktree of the current directory and reports sizes.
…zes in prune prune and the reclaim of add keep the worktree that holds the current directory, also under --force. Each removable worktree reports the size of its directory, and the preview and final lines give the total. Part of #2338.
add runs the rules of prune --confirm before it looks for a holder, because a merged worktree still holds its issue. A reclaim that cannot read the pull requests is reported and does not stop the run. --no-reclaim skips it, and --dry-run lists its GitHub reads. Part of #2338.
Archives 2338-reclaim-merged-worktrees and adds its requirements to the capabilities repos-worktrees-add and repos-worktrees-prune. Closes #2338.
Owner
Author
|
Test evidence for this pull request.
|
dan-petty
marked this pull request as ready for review
October 27, 2026 16:57
dan-petty
pushed a commit
that referenced
this pull request
Oct 27, 2026
🤖 I have created a release *beep* *boop* --- ## [0.8.0](v0.7.4...v0.8.0) (2026-10-27) ### Features * **github:** devops gh issues view shows one issue ([#2374](#2374)) ([63be7ed](63be7ed)), closes [#2361](#2361) * **repos:** make devops repos worktrees add remove merged worktrees first ([#2351](#2351)) ([6d3a18a](6d3a18a)), closes [#2338](#2338) ### Bug Fixes * **k8s:** devops k8s configure-urls saves a run that changes only the task gateway urls ([#2384](#2384)) ([1a7e7c7](1a7e7c7)) * **k8s:** exit non-zero when kube-linter is unavailable or reports findings ([#2386](#2386)) ([31c5a0b](31c5a0b)), closes [#2095](#2095) * **scan:** serialize status and reason in JSON and YAML scan output ([#2385](#2385)) ([d594b55](d594b55)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
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.
devops repos worktrees addnow removes the worktrees of merged work first, so merged worktrees leave the disk without a person runningprune.addlooks for a holder, it removes each worktree thatprune --confirmremoves: clean, not locked, not the current directory, and at the head of a merged pull request. It names each with the size of its directory.--no-reclaimskips the step, and--dry-runlists the GitHub reads and removes nothing.add 2344was refused while the merged worktree of chore(deps): update uv to 0.13.6 and Python to 3.14.10 #2344 stood on disk. The reclaim runs before the check for a holder for that reason.addsays why once (reclaim_errorin the JSON) and creates the worktree.pruneand the reclaim keep the worktree that holds the current directory, also under--force. Before this,prune --confirmrun inside a clean merged worktree removed the directory of the shell.size_bytes), and the preview and final lines give the total.addremoves first.Why
add: it is the first command of every piece of work, it clears the worktrees of every agent tool because git lists them all, and a merged worktree blocks it. The other places fail. The end ofdevops prcannot fire, because a person merges after the agent's commands end.devops workspace cleanis a manual command likeprune. The roadmap jobs do not see a workstation. A side effect ofdevops ghwould remove directories as a hidden effect of an unrelated command. The design of the archived change records each one.Closes #2338