feat: run delete-branch-on-merge setup on copier update too#305
feat: run delete-branch-on-merge setup on copier update too#305ichoosetoaccept merged 1 commit intomainfrom
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
Greptile SummaryRemoves the Confidence Score: 5/5Safe to merge — single-line guard removal with well-established idempotency via existing CLI guards and The change is minimal and correct. All remaining findings are P2 or lower (the misleading comment was already flagged in a prior review thread). The command's failure-safe design handles every edge case (no gh, no git, no permissions) cleanly. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User
participant C as Copier
participant GH as gh CLI
U->>C: copier copy / update / recopy
C->>C: chmod scripts
C->>C: uv sync --upgrade
alt update or recopy
C->>C: prek install (if .git exists)
end
C->>GH: command -v gh (check if installed)
alt gh not found
GH-->>C: fail → || true (silent skip)
else gh found
C->>GH: gh repo view (check GitHub repo context)
alt not a GitHub repo
GH-->>C: fail → || true (silent skip)
else GitHub repo found
C->>GH: gh repo edit --delete-branch-on-merge --enable-auto-merge
GH-->>C: success / fail → || true (silent skip)
end
end
alt copy
C->>U: printf "🎉 Project created!"
else update or recopy
C->>U: printf "🎉 Template updated!"
end
Reviews (2): Last reviewed commit: "feat: run delete-branch-on-merge setup o..." | Re-trigger Greptile |
The gh repo edit task that enables delete-branch-on-merge and auto-merge was copy-only. Projects created before this task was added never got the setting. Now runs on every copier operation since it's idempotent and fails silently. Resolves DOT-480
c435c20 to
4f4d8b2
Compare
The gh repo edit task that enables delete-branch-on-merge and
auto-merge was copy-only. Projects created before this task was
added never got the setting. Now runs on every copier operation
since it's idempotent and fails silently.
Resolves DOT-480
Closes #