Skip to content

feat(pr): squash + delete source branch by default, except from long-lived branches - #116

Merged
aersam merged 4 commits into
mainfrom
pr-merge-defaults
Oct 29, 2026
Merged

aersam merged 4 commits into
mainfrom
pr-merge-defaults

Conversation

@aersam

@aersam aersam commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #115

bdt pr create now defaults to squash and delete source branch for PRs from a feature branch, but not for PRs whose source is a long-lived branch (promotions dev -> test -> main, back-merges main -> dev).

  • New bmsdna/devtools/pr_merge_defaults.py; the long-lived set (case-insensitive globs) defaults to dev, develop, test, main, master, release/* and is configurable via [tool.bdt.pr].long_lived_branches (reuses the existing [tool.bdt.*] config lookup).
  • Rule is by source branch, matching the promotion definition in the branching-strategy skill: squashing promotions makes every later one conflict again, and deleting dev/test after a promotion would be destructive.
  • Only what the host can act on is defaulted: Azure DevOps gets both as completion options; GitHub only gets squash for --auto-complete (no per-PR delete-branch switch there), so no spurious "ignored" notes.
  • Explicit --squash / --delete-source-branch (also --squash false) always win.
  • README and skills/bmsdna-devtools/SKILL.md updated.

No UI change, so no screenshots.

  • Known limit: a stacked PR's source branch (target of another open PR) is not detected; pass --delete-source-branch false there (documented).

Claude Session: https://claude.ai/code/session_011Tc8S9f7xnyRyi7LzeHVtm

aersam and others added 4 commits October 29, 2026 13:31
…lived branches (#115)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Tc8S9f7xnyRyi7LzeHVtm
…ads/ in config (#115)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Tc8S9f7xnyRyi7LzeHVtm
…n on malformed config (#115)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Tc8S9f7xnyRyi7LzeHVtm
@aersam
aersam marked this pull request as ready for review October 29, 2026 12:35
@aersam
aersam merged commit 252763f into main Oct 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Squash Commit

1 participant