Skip to content

m github merge_pr

Merge a pull request.

https://docs.github.com/en/rest/reference/pulls#merge-a-pull-request

example::

$ m github merge_pr \\
    --owner owner \\
    --repo repo \\
    --commit-title 'commit_title' \\
    99
Source code in m/cli/commands/github/merge_pr.py
class Arguments(BaseModel):
    r"""Merge a pull request.

    https://docs.github.com/en/rest/reference/pulls#merge-a-pull-request

    example::

        $ m github merge_pr \\
            --owner owner \\
            --repo repo \\
            --commit-title 'commit_title' \\
            99
    """

    owner: str = Arg(
        default=env('GITHUB_REPOSITORY_OWNER'),
        help='repo owner',
    )
    repo: str = Arg(
        help='repo name',
        required=True,
    )
    commit_title: str | None = Arg(
        help='commit title',
    )
    pr: int = Arg(
        help='the pr number',
        positional=True,
        required=True,
    )

Required arguments

--repo

repo name

Options

--owner

  • default: 'jmlopez-rod'

repo owner

--commit-title

commit title

Positional arguments

pr

the pr number