Branch & PR lifecycle
How the engine turns one issue into a scaffolded branch and an open PR.
from nebuko.engine.models import IssueReffrom nebuko.engine.lib.git.branch_scaffold import scaffold_issue
result = scaffold_issue( IssueRef(number=1153, title="Prevent multiple branches"), base="origin/main",)print(result.branch_name) # feature/1153-prevent-multiple-branchesprint(result.pr_url) # https://github.com/.../pull/...Mechanics
Section titled “Mechanics”- Slug — the issue title is slugified (lowercase, non-alphanumerics
collapsed to
-, trimmed to 60 chars). - Branch naming — the branch is
feature/<issue_number>-<slug>. - Base — the branch is cut from
base(origin/mainby default). - PR — a draft PR is opened against
baselinking back to the issue.