MCPcopy Create free account
hub / github.com/bluekeyes/patch2pr / helpText

Function helpText

cmd/patch2pr/main.go:495–578  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

493}
494
495func helpText() string {
496 help := `
497Usage: patch2pr [options] [patch...]
498
499 Create a GitHub pull request from a patch file
500
501 This command parses one or more patches, applies them, and creates a pull
502 request with the result. It does not clone the repository. If no patch files
503 are given, the command reads the patches from standard input. Each file can
504 contain a single patch or multiple patches in the mbox format produced by 'git
505 format-patch --stdout' or GitHub's patch view.
506
507 By default, patch2pr uses the patch header for author and committer
508 information, falling back to the authenticated GitHub user if the headers are
509 missing or invalid. Callers can override these values using the standard Git
510 environment variables:
511
512 GIT_AUTHOR_NAME
513 GIT_AUTHOR_EMAIL
514 GIT_AUTHOR_DATE
515 GIT_COMMITTER_NAME
516 GIT_COMMITER_EMAIL
517 GIT_COMMITER_DATE
518
519 Override the commit message by using the -message flag.
520
521 With the -fork and -fork-repository flags, the command can submit the pull
522 request from a fork repository. If an existing fork does not exist, the
523 command creates a new fork, which may take up to five minutes.
524
525Options:
526
527 -base-branch=branch The branch to target with the pull request. If unset,
528 use the repository's default branch.
529
530 -draft Create a draft pull request.
531
532 -force Update the head branch even if it exists and is not a
533 fast-forward.
534
535 -fork Submit the pull request from a fork instead of pushing
536 directly to the repository. With no other flags, use a
537 fork in the current account with the same name as the
538 target repository, creating the fork if it does not exist.
539
540 -fork-repository=repo Submit the pull request from the named fork instead of
541 pushing directly to the repository, creating the fork
542 if it does not exist. Implies the -fork flag.
543
544 -head-branch=branch The branch to create or update with the new commit. If
545 unset, use 'patch2pr'.
546
547 -json Output information about the new commit and pull request
548 in JSON format.
549
550 -message=message Message for the commit. Overrides the patch header.
551
552 -no-pull-request Do not create a pull request after creating a commit.

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected