Skip to content

m github ci

Retrieve the information required for continuous integration.

example::

$ m github ci \
    --owner jmlopez-rod \
    --repo pysync \
    --sha 4538b2a2556efcbdfc1e7df80c4f71ade45f3958 \
    --pr 1 \
    --include-release | m json
{
"commit": {
    "associatedPullRequests": {
    "nodes": [
        {
        "author": {
            "login": "jmlopez-rod",
            "avatarUrl": "https://avatars.githubusercontent.com/...",
            "email": ""
        },
...

NOTE: Use the --merge-commit flag if you are providing a sha from github actions.

Source code in m/cli/commands/github/ci.py
class Arguments(BaseModel):
    r"""Retrieve the information required for continuous integration.

    example::

        $ m github ci \
            --owner jmlopez-rod \
            --repo pysync \
            --sha 4538b2a2556efcbdfc1e7df80c4f71ade45f3958 \
            --pr 1 \
            --include-release | m json
        {
        "commit": {
            "associatedPullRequests": {
            "nodes": [
                {
                "author": {
                    "login": "jmlopez-rod",
                    "avatarUrl": "https://avatars.githubusercontent.com/...",
                    "email": ""
                },
        ...

    NOTE: Use the --merge-commit flag if you are providing a sha from
    github actions.
    """

    owner: str = Arg(
        default=env('GITHUB_REPOSITORY_OWNER'),
        help='repo owner',
    )
    repo: str = Arg(
        help='repo name',
        required=True,
    )
    sha: str = Arg(
        help='commit sha',
        required=True,
    )
    pr: int | None = Arg(help='pull request number')
    file_count: int = Arg(
        default=10,
        help='max number of files to retrieve',
    )
    include_release: bool = Arg(
        default=False,
        help='include the last release information',
    )
    merge_commit: bool = Arg(
        default=False,
        help='set if the sha is a merge commit sha (from github)',
    )

Required arguments

--repo

repo name

--sha

commit sha

Options

--owner

  • default: 'jmlopez-rod'

repo owner

--pr

pull request number

--file-count

  • default: 10

max number of files to retrieve

--include-release

  • default: false

include the last release information

--merge-commit

  • default: false

set if the sha is a merge commit sha (from github)