Pr Cmd
CLI command for generating pull requests using the refactored lazy-loading pattern.
PRAction
Bases: str
, Enum
Actions for PR command.
Source code in src/codemap/cli/pr_cmd.py
14 15 16 17 18 |
|
CREATE
class-attribute
instance-attribute
CREATE = 'create'
UPDATE
class-attribute
instance-attribute
UPDATE = 'update'
validate_workflow_strategy
validate_workflow_strategy(value: str | None) -> str | None
Validate workflow strategy - lightweight callback for typer.
Source code in src/codemap/cli/pr_cmd.py
21 22 23 24 25 26 27 28 |
|
ActionArg
module-attribute
ActionArg = Annotated[
PRAction,
Argument(help="Action to perform: create or update"),
]
BranchNameOpt
module-attribute
BranchNameOpt = Annotated[
str | None,
Option("--branch", "-b", help="Target branch name"),
]
BranchTypeOpt
module-attribute
BranchTypeOpt = Annotated[
str | None,
Option(
"--type",
"-t",
help="Branch type (feature, release, hotfix, bugfix)",
),
]
BaseBranchOpt
module-attribute
BaseBranchOpt = Annotated[
str | None,
Option(
"--base",
help="Base branch for the PR (defaults to repo default)",
),
]
TitleOpt
module-attribute
TitleOpt = Annotated[
str | None, Option("--title", help="Pull request title")
]
DescriptionOpt
module-attribute
DescriptionOpt = Annotated[
str | None,
Option(
"--desc",
"-d",
help="Pull request description (file path or text)",
),
]
NoCommitOpt
module-attribute
NoCommitOpt = Annotated[
bool,
Option(
"--no-commit",
help="Skip the commit process before creating PR",
),
]
ForcePushOpt
module-attribute
ForcePushOpt = Annotated[
bool,
Option(
"--force-push", "-f", help="Force push the branch"
),
]
PRNumberOpt
module-attribute
PRNumberOpt = Annotated[
int | None,
Option(
"--pr",
help="PR number to update (required for update action)",
),
]
WorkflowOpt
module-attribute
WorkflowOpt = Annotated[
str | None,
Option(
"--workflow",
"-w",
help="Git workflow strategy (github-flow, gitflow, trunk-based)",
callback=validate_workflow_strategy,
),
]
NonInteractiveOpt
module-attribute
NonInteractiveOpt = Annotated[
bool,
Option(
"--non-interactive",
help="Run in non-interactive mode",
),
]
ModelOpt
module-attribute
ModelOpt = Annotated[
str | None,
Option(
"--model",
"-m",
help="LLM model for content generation",
),
]
ApiBaseOpt
module-attribute
ApiBaseOpt = Annotated[
str | None,
Option("--api-base", help="API base URL for LLM"),
]
ApiKeyOpt
module-attribute
ApiKeyOpt = Annotated[
str | None, Option("--api-key", help="API key for LLM")
]
BypassHooksFlag
module-attribute
BypassHooksFlag = Annotated[
bool,
Option(
"--bypass-hooks",
"--no-verify",
help="Bypass git hooks with --no-verify",
),
]
register_command
register_command(app: Typer) -> None
Register the pr command with the Typer app.
Source code in src/codemap/cli/pr_cmd.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
|