REPOMATIC-PR-BODY(1) REPOMATIC-PR-BODY(1)

repomatic pr-body - Generate PR body with workflow metadata

repomatic pr-body [OPTIONS]

Generate a PR body with a collapsible workflow metadata block.

Reads GITHUB_* environment variables to produce a <details> block listing the workflow metadata (documentation, trigger, actor, ref, commit, job, workflow, run).

The prefix can be set via --template (built-in templates), --prefix (arbitrary content, also via GHA_PR_BODY_PREFIX env var) or --prefix-file (the same content read from a file, also via GHA_PR_BODY_PREFIX_FILE). If a template and a prefix are both given, the prefix is prepended before the rendered template content.

Content to prepend before the metadata details block. Can also be set via the GHA_PR_BODY_PREFIX environment variable.
Read the prefix from a file instead of --prefix, for a report too large to travel in an environment variable. Can also be set via the GHA_PR_BODY_PREFIX_FILE environment variable. Wins over --prefix when both are given.
Use a built-in prefix template instead of --prefix.
Use an external template file (markdown with optional YAML frontmatter). Mutually exclusive with --template. Lets downstream repos ship project-specific PR templates without modifying repomatic. Templates should set 'footer: false' in their frontmatter to avoid duplicating the attribution footer that ships with the metadata block.
Pass an arbitrary key/value pair to the template. Repeat to provide multiple. Use this to feed template variables not covered by the dedicated --version / --part / --pr-ref flags. Example: --template-arg channel=Nix.
Read a template value from a file. Repeat to provide multiple. Use this for a value with no ceiling on its size, like a generated table: a report travels as a path rather than inline. Example: --template-arg-file summary=proposal.md.
Version string passed to the template (e.g. 1.2.0).
Version part passed to the bump-version template.
PR reference passed to detect-squash-merge template (e.g. #2316).
Output file path. Defaults to stdout.
Format for --output. 'github-actions' wraps body, title, and commit_message as step output variables.
Show this message and exit.

Content to prepend before the metadata details block. Can also be set via the GHA_PR_BODY_PREFIX environment variable.
Content to prepend before the metadata details block. Can also be set via the GHA_PR_BODY_PREFIX environment variable.
Read the prefix from a file instead of --prefix, for a report too large to travel in an environment variable. Can also be set via the GHA_PR_BODY_PREFIX_FILE environment variable. Wins over --prefix when both are given.
Read the prefix from a file instead of --prefix, for a report too large to travel in an environment variable. Can also be set via the GHA_PR_BODY_PREFIX_FILE environment variable. Wins over --prefix when both are given.
Use a built-in prefix template instead of --prefix.
Use an external template file (markdown with optional YAML frontmatter). Mutually exclusive with --template. Lets downstream repos ship project-specific PR templates without modifying repomatic. Templates should set 'footer: false' in their frontmatter to avoid duplicating the attribution footer that ships with the metadata block.
Pass an arbitrary key/value pair to the template. Repeat to provide multiple. Use this to feed template variables not covered by the dedicated --version / --part / --pr-ref flags. Example: --template-arg channel=Nix.
Read a template value from a file. Repeat to provide multiple. Use this for a value with no ceiling on its size, like a generated table: a report travels as a path rather than inline. Example: --template-arg-file summary=proposal.md.
Version string passed to the template (e.g. 1.2.0).
Version part passed to the bump-version template.
PR reference passed to detect-squash-merge template (e.g. #2316).
Output file path. Defaults to stdout.
Format for --output. 'github-actions' wraps body, title, and commit_message as step output variables.
Show this message and exit.

0
Success.
1
A runtime error, or an aborted prompt (Ctrl-C, a declined confirmation).
2
A usage error: unknown option, invalid value, missing operand, or an unparsable configuration file.

Preview metadata block locally

repomatic pr\-body

CI: write as GitHub Actions step outputs

repomatic pr\-body \-\-output "$GITHUB_OUTPUT" \-\-output\-format github\-actions

Use a built-in template

repomatic pr\-body \-\-template bump\-version \-\-version 1.2.0 \-\-part minor

Use a downstream-shipped template with custom variables

repomatic pr\-body \-\-template\-file path/to/template.md \-\-template\-arg fruit=mango \-\-template\-arg crate=10

With a prefix via environment variable

GHA_PR_BODY_PREFIX="Fix formatting" repomatic pr\-body

Kevin Deldycke

2026-09-14 7.15.1.dev0