mass_driver.commands
The different main commands of the mass-driver tool
Module Contents
Functions
Process the CLI for ‘Drivers’ subcommand |
|
Process the CLI for ‘Forges’ subcommand |
|
Process the CLI for ‘Sources’ subcommand |
|
Process the CLI for a generic plugin subcommand |
|
Process the CLI for ‘run’ |
|
Process the CLI for ‘scan’ |
|
Review a list of Pull Requests |
|
Exit in case of bad config models |
|
Read the repo from args, if any |
|
Read the repo-list or repo-path arg, if any |
|
Consider saving the outcome |
|
Save the output to given JSON file handle |
|
Check if we need to call the activity_run command = Clone/Mig/Scan step |
API
- mass_driver.commands.drivers_command(args: argparse.Namespace)[source]
Process the CLI for ‘Drivers’ subcommand
- mass_driver.commands.forges_command(args: argparse.Namespace)[source]
Process the CLI for ‘Forges’ subcommand
- mass_driver.commands.sources_command(args: argparse.Namespace)[source]
Process the CLI for ‘Sources’ subcommand
- mass_driver.commands.plugins_command(args: argparse.Namespace, plugin: str, entrypoint: Callable, discover: Callable)[source]
Process the CLI for a generic plugin subcommand
- mass_driver.commands.run_command(args: argparse.Namespace) mass_driver.models.activity.ActivityOutcome [source]
Process the CLI for ‘run’
- mass_driver.commands.review_pr_command(args: argparse.Namespace)[source]
Review a list of Pull Requests
- mass_driver.commands.config_error_exit(e: pydantic.ValidationError)[source]
Exit in case of bad config models
- mass_driver.commands.source_repolist_args(args) Optional[mass_driver.models.repository.IndexedRepos] [source]
Read the repo from args, if any
- mass_driver.commands.read_repolist(args) Optional[list[str]] [source]
Read the repo-list or repo-path arg, if any
- mass_driver.commands.maybe_save_outcome(args: argparse.Namespace, outcome: mass_driver.models.activity.ActivityOutcome)[source]
Consider saving the outcome
- mass_driver.commands.save_outcome(outcome: mass_driver.models.activity.ActivityOutcome, out_file)[source]
Save the output to given JSON file handle
- mass_driver.commands.needs_run(activity: mass_driver.models.activity.ActivityLoaded) bool [source]
Check if we need to call the activity_run command = Clone/Mig/Scan step
We usually do if: migration OR scan OR forge with git_push_first=True
Last one because git_push requires resolving ssh clone url to local repo path which is what clone step does in activity_run