Skip to content

BBC2-42 add --draft flag to bb pr create#14

Merged
b2l merged 1 commit into
mainfrom
b2lpowa/bbc2-42-support-draft-on-bb-pr-create
Apr 15, 2026
Merged

BBC2-42 add --draft flag to bb pr create#14
b2l merged 1 commit into
mainfrom
b2lpowa/bbc2-42-support-draft-on-bb-pr-create

Conversation

@b2l
Copy link
Copy Markdown
Owner

@b2l b2l commented Apr 15, 2026

Summary

  • Adds --draft flag to bb pr create. When set, posts draft: true to Bitbucket; otherwise omits the field so the server-side default applies.
  • Lands docs/bb-notes.md — verified Bitbucket Cloud API notes from the backlog grooming session. Referenced by upcoming tickets BBC2-40, 15, 17, 14, 18, 24, 25, 23.

Test plan

  • `bun src/index.ts pr create --draft --title "test: draft PR" --body "..."` creates a draft PR — verify in the Bitbucket UI that it shows as a draft.
  • `bun src/index.ts pr create --title "test: non-draft" --body "..."` creates a normal PR — verify not draft in UI.
  • Backend tests pass: `bun test src/backend/pullrequests` (24 tests).
  • Full test suite passes: `bun test` (131 tests).
  • Lint clean: `bun run lint`.

Notes

  • `--draft=false` (explicit) is treated identically to omitting the flag — we never send `draft: false` in the body. One test locks this in.
  • The `docs/bb-notes.md` bundle is a one-file add; flagged in the commit message. If you'd rather split it into its own PR, happy to do so — it's a small change either way.

Wires a new --draft flag through the command layer into the POST
body. The field is only included when true; when false or absent,
we omit it so Bitbucket's server-side default applies.

Also lands docs/bb-notes.md — verified Bitbucket Cloud API notes
from the backlog grooming session, referenced by several upcoming
tickets (BBC2-40, 15, 17, 14, 18, 24, 25, 23).
@b2l b2l merged commit 4270a1b into main Apr 15, 2026
1 check passed
@b2l b2l deleted the b2lpowa/bbc2-42-support-draft-on-bb-pr-create branch April 15, 2026 08:11
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.

1 participant