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

BSRD-806: bring back things from the submodule task #57

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[IMP] otools-pending show: check multiple repos at once (default=all …
…repos)
  • Loading branch information
ivantodorovich authored and gurneyalex committed Jan 10, 2025
commit 8dc4365291120c325b02a80458555403167592d5
16 changes: 12 additions & 4 deletions odoo_tools/cli/pending.py
Original file line number Diff line number Diff line change
@@ -12,7 +12,11 @@ def cli():


@cli.command(name="show")
@click.argument("repo_path")
@click.argument(
"repo_paths",
required=False,
nargs=-1,
)
@click.option(
"-s",
"--state",
@@ -26,10 +30,14 @@ def cli():
help="remove the pull request in a state matching the value if the option from the git-aggregator file",
type=click.Choice(["closed", "merged"], case_sensitive=False),
)
def show_pending(repo_path, state=None, purge=None):
def show_pending(repo_paths=(), state=None, purge=None):
"""List pull requests on <repo_path>"""
repo = pm_utils.Repo(repo_path)
repo.show_prs(state=state, purge=purge)
if not repo_paths:
repositories = pm_utils.Repo.repositories_from_pending_folder()
else:
repositories = [pm_utils.Repo(repo_path) for repo_path in repo_paths]
for repo in repositories:
repo.show_prs(state=state, purge=purge)


# TODO: add tests