Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git_machete.cli.launch inconsistently checks options in both parsed_cli and cli_opts #1097

Open
PawelLipski opened this issue Nov 19, 2023 · 0 comments
Labels
cli Relates to command-line interface code quality Quality of the code nees improving good first issue Good for newcomers

Comments

@PawelLipski
Copy link
Collaborator

We've got sometimes:

                machete_client.checkout_github_prs(pr_numbers=parsed_cli.pr_no if 'pr_no' in parsed_cli else [],
                                                   all=parsed_cli.all if 'all' in parsed_cli else False,
                                                   mine=parsed_cli.mine if 'mine' in parsed_cli else False,
                                                   by=parsed_cli.by if 'by' in parsed_cli else None,
                                                   fail_on_missing_current_user_for_my_opened_prs=True)

but most of the time:

                machete_client.create_github_pr(
                    head=current_branch,
                    opt_draft=cli_opts.opt_draft,
                    opt_onto=cli_opts.opt_onto)

Advantage of cli_opts: type-safe access

Advantage of parsed_cli: one layer less to pass data around

TBD what to do

@PawelLipski PawelLipski added good first issue Good for newcomers code quality Quality of the code nees improving cli Relates to command-line interface labels Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Relates to command-line interface code quality Quality of the code nees improving good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant