Something went wrong. Try again.
Integrated repository, worktree, git stacker, and project manager
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849"""`pm stacker push`."""
from typing import Annotated
from cyclopts import Parameter
from project_manager import configfrom project_manager.cli._shared import StackerScopefrom project_manager.stacker.models import PushOptions
from . import _common, stacker_app
@stacker_app.commanddef push( branch: str | None = None, scope: StackerScope = StackerScope(), *, only: Annotated[bool, Parameter(negative="")] = False, draft: Annotated[bool, Parameter(negative="")] = False, publish: Annotated[bool, Parameter(negative="")] = False, create_pr: bool = True, json: Annotated[bool, Parameter(negative="")] = False,) -> int: """Force-push + create/update PRs for a scope.
`--draft` / `--publish` are mutually exclusive. `--no-create-pr` force-pushes without touching PRs. """ if draft and publish: raise ValueError("--draft and --publish are mutually exclusive.") paths = config.load() svc = _common.service(paths) options = PushOptions( scope=_common.scope_spec(scope, only=only), draft=draft, publish=publish, create_pr=create_pr, ) target = _common.target(scope.repo, branch, paths) return _common.emit_result( svc.push(target, options), json=json, command="push", repo=target.repo_name, branch=target.branch, paths=paths, )