maton github pr create

maton github pr create [flags]

Open a PR against –base from –head. Both branches must already exist on the remote. To open a cross-fork PR, use ‘owner:branch’ as –head.

Reviewers, assignees, and labels are applied as follow-up calls after the PR is created (the create endpoint itself doesn’t accept them). Pass ‘@me’ as a reviewer or assignee to mean the authenticated user.

Options

-a, --assignee <string>
Comma-separated assignee logins ('@me' for self)
-B, --base <string>
Target branch (required)
-b, --body <string>
PR body (markdown)
--connection <string>
Connection ID to route through (Maton-Connection header)
-d, --draft
Open as a draft PR
--dry-run
Print the request that would be sent without executing it
--format <string>
Output format: 'json' (default) or 'text' on supported commands
-H, --head <user:branch>
Source branch (user:branch or `branch`) (required)
--issue <string>
Convert an existing issue number to a PR (instead of --title)
-q, --jq <expression>
Filter JSON output using a jq expression
-l, --label <string>
Comma-separated label names to apply
--maintainer-can-modify (default true)
Allow maintainers of the upstream to push to the PR
--paginate
Follow next_cursor and concatenate all pages (list commands only)
-R, --repo <owner/repo>
Target repository in owner/repo form (required)
-r, --reviewer <team:slug>
Comma-separated reviewer logins (or team:slug for teams; '@me' for self)
--template <string>
Format JSON output using a Go template; see "maton help formatting"
-F, --text-from-file <file>
Read body from file (or `-` for stdin)
-t, --title <string>
PR title

Options inherited from parent commands

-p, --profile <string>
Profile to use for this invocation (overrides the active profile; also reads MATON_PROFILE)

Examples

$ maton github pr create --repo maton-ai/cli --base main --head feature --title "New thing" --body "..."
$ maton github pr create --repo maton-ai/cli --base main --head feature --title "WIP" --reviewer alice,bob --label needs-review
$ maton github pr create --repo maton-ai/cli --base main --head fork-owner:branch --title "From fork" --draft

See also