Skip to content

m github branch_prs

Retrieve pull requests associated with a branch.

example::

$ m github branch_prs --owner jmlopez-rod --repo m release/0.18.0

preview

Source code in m/cli/commands/github/branch_prs.py
class Arguments(BaseModel):
    """Retrieve pull requests associated with a branch.

    example::

        $ m github branch_prs --owner jmlopez-rod --repo m release/0.18.0

    ![preview](../../assets/branch_prs.svg)
    """

    pretty: bool = Arg(
        default=False,
        help='format json payload with indentation',
    )
    yaml: bool = Arg(
        default=False,
        help='use yaml format',
    )
    owner: str = Arg(
        default='GITHUB_REPOSITORY_OWNER',
        validator=env_var,
        help='repo owner',
    )
    repo: str = Arg(
        help='repo name',
        required=True,
    )
    branch: str = Arg(
        help='branch name',
        required=True,
        positional=True,
    )

Required arguments

--repo

repo name

Options

--pretty

  • default: false

format json payload with indentation

--yaml

  • default: false

use yaml format

--owner

  • default: env.GITHUB_REPOSITORY_OWNER

repo owner

Positional arguments

branch

branch name