Skip to content

close_all

Functions for janitor sub-command. Cleanup related commands.

close_all(state, keep_remote_branches)

Closes all opened PRs in state file.

Source code in dapla_team_cli/pr/janitor/close_all.py
21
22
23
24
25
26
27
28
29
30
@batch_handler
def close_all(state: State, keep_remote_branches: bool) -> None:
    """Closes all opened PRs in state file."""
    print(RichWarning(message="The following pull requests will be closed:"))
    show_state(state)
    answer = questionary.confirm("Are you sure you want to close all listed pull requests?").ask()
    if not answer:
        sys.exit(1)

    _close_all_prs(state, keep_remote_branches)