| name | tidb-pr-metadata-guard |
| description | Use when creating or editing TiDB pull requests so PR title scope, PR template fields, hidden HTML comments, and bot-parsed checklist sections stay intact. Trigger on tasks involving PR creation, PR body updates, issue linking from a PR, test checklist updates, or investigating labels like do-not-merge/needs-tests-checked. |
TiDB PR Metadata Guard
Overview
Use this skill for TiDB GitHub pull request metadata updates.
The goal is to preserve repository-required PR structure while editing only the mutable fields.
Before changing a PR body, read .github/pull_request_template.md.
Workflow
- Write PR titles and descriptions in English.
- For a new PR, start from
.github/pull_request_template.md instead of writing the body from scratch.
- Use a title in the form
pkg [, pkg2, pkg3]: what is changed or *: what is changed.
- In that title format,
pkg means the TiDB module area, not a literal Go package path. For example, changes under pkg/planner/core usually map to planner, not pkg/planner/core.
- Use
gh pr create -T .github/pull_request_template.md.
- Fill in the template in a Markdown file first, then submit it.
- For an existing PR, update only the mutable sections.
- Safe targets:
Issue Number:, Problem Summary:, the content under ### What changed and how does it work?, test checkbox states and concrete commands, and the release-note block.
- Do not rename headings, reorder checklist sections, or rewrite the template wholesale.
- Preserve hidden HTML comments exactly.