Skip to content

Describe

Auto-generates PR descriptions: title, type, summary, code walkthrough, and an optional Mermaid diagram.

Run it from the CLI:

mergemate-review --pr_url https://github.com/owner/repo/pull/42 describe

Or comment on the PR:

/describe

Within ~30 seconds the tool fills in — or updates — the PR description.

Pass config overrides inline:

/describe --pr_description.generate_ai_title=true --pr_description.publish_labels=true

Automating description

[github_app]
pr_commands = [
    "/describe",
]

[pr_description]
publish_labels = true

Preserving your own description

MergeMate places anything above the generated "PR Type" header into a preserved zone. Write your own notes there and they'll survive subsequent /describe runs.

If your original description gets clobbered, two things happened:

  1. You edited the description while the tool was running — a race condition.
  2. Your content sat below the auto-generated markers, so MergeMate treated it as replaceable.

Always write your initial description before opening the PR so the tool can see it.

Mermaid sequence diagrams

The tool can render a horizontal Mermaid flowchart of component interactions right in the PR body. Controlled by enable_pr_diagram (default: true).

Configuration

Option Default Notes
publish_labels false Applies type labels (bug, enhancement, docs, etc.) to the PR.
publish_description_as_comment false Posts as a comment instead of overwriting the PR body.
publish_description_as_comment_persistent true Edits the same comment on re-runs.
add_original_user_description true Preserves your description above auto-generated content.
generate_ai_title false Rewrites the PR title using AI.
extra_instructions "" Additional guidance for the model.
enable_pr_type true Shows the "PR Type" field in the output.
final_update_message true Posts a note when the description updates to the latest commit.
enable_semantic_files_types true Generates the "Changes walkthrough" section.
file_table_collapsible_open_by_default false Expands the file table by default.
collapsible_file_list "adaptive" Collapses the file list when there are >8 files. Set to true or false to override.
enable_large_pr_handling true Makes multiple AI calls for large PRs to cover more files.
enable_help_text false Appends help text to the output.
enable_pr_diagram true Renders a Mermaid flowchart of the changes.
auto_create_ticket false Creates a ticket in the linked ticketing system on PR open.

Markers — template mode

Enable markers to control exactly where each section lands in the PR body:

[pr_description]
use_description_markers = true

Then place tokens in your PR description:

## PR Type:
mergemate:type

## PR Description:
mergemate:summary

## PR Walkthrough:
mergemate:walkthrough

## PR Diagram:
mergemate:diagram

MergeMate replaces each token with the corresponding generated content. If no markers exist, the description is left untouched.

Param Default Notes
use_description_markers false Switches to marker-based rendering.
include_generated_by_header true Adds a "Generated by MergeMate" header.

Custom labels

The built-in label set is generic: Bug fix, Tests, Enhancement, Documentation, Other. Define your own:

[config]
enable_custom_labels = true

[custom_labels."performance"]
description = "Use when the PR changes affect runtime speed or memory usage"

[custom_labels."api_change"]
description = "Use when a public API signature is added, removed, or modified"

Each description should be a conditional statement that tells the model when to apply the label. Labels that no longer apply are automatically removed on the next /describe or /generate_labels run.

You can also manage labels from your repo's label page — prefix the description with mergemate: (e.g. mergemate: A new SQL query was added).

Tips

  • Set /describe as a default pr_command so every PR gets a consistent description with zero effort.
  • Use markers if you have a strict PR template and want generated content in specific spots.
  • Custom labels pay off fast. Spend five minutes defining labels that match your team's vocabulary and the model will use them accurately.