tidb-pr-metadata-guard

Preserves TiDB pull request template structure while editing mutable PR metadata fields.

40.5k|6.2k|Updated Sep 6, 2015
One-click install
npx skills add https://github.com/pingcap/tidb --skill tidb-pr-metadata-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tidb-pr-metadata-guard
Source: https://github.com/pingcap/tidb/tree/main/.agents/skills/tidb-pr-metadata-guard
Command: npx skills add https://github.com/pingcap/tidb --skill tidb-pr-metadata-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TiDB pull requests are parsed by bots that gate merges on specific template sections, hidden HTML comments, and checklist states. Accidentally renaming headings, deleting comments, or using wrong title scopes breaks automation and leaves labels like do-not-merge/needs-tests-checked stuck on the PR.

Core Features & Use Cases

  • Template-Safe PR Creation: Starts new PRs from .github/pull_request_template.md using gh pr create -T, with titles in the form pkg: what is changed using module scopes like planner or executor.
  • Guarded PR Body Edits: Updates only mutable sections such as Issue Number, Problem Summary, test checkboxes, and the release-note block while preserving hidden HTML comments verbatim.
  • Bot Label Verification: Re-reads the PR after edits to confirm labels like do-not-merge/needs-linked-issue and do-not-merge/needs-tests-checked changed as expected.
  • Use Case: When linking a new issue to an existing TiDB PR, create the issue first, then patch only the Issue Number line and verify the needs-linked-issue label is removed.

Quick Start

Update my TiDB pull request body to link issue #12345 and check the unit test checkbox without breaking the PR template structure.

Frequently Asked Questions about tidb-pr-metadata-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a TiDB pull request with the correct template?

Create a TiDB PR by filling in .github/pull_request_template.md in a local Markdown file first, then submit it with gh pr create -T .github/pull_request_template.md. Use a title in the form pkg: what is changed with module scopes like planner or executor.

How do I update a TiDB PR body without breaking bot checks?

Edit only the mutable sections: Issue Number, Problem Summary, the what-changed section, test checkboxes, and the release-note block. Never rename headings, reorder checklists, or delete hidden HTML comments, then re-read the PR to confirm bot labels updated.

Why is the do-not-merge/needs-tests-checked label stuck on my TiDB PR?

The label persists when no test checkbox is checked or the Tests line lost its required HTML comment. Diff the PR body against .github/pull_request_template.md, restore the comment verbatim, and check at least one test box or No need to test with a reason.

What title format does TiDB require for pull requests?

TiDB PR titles use the form pkg [, pkg2]: what is changed or *: what is changed, where pkg is a module area like planner or executor, not a raw Go package path such as pkg/planner/core. Titles and descriptions must be written in English.

How do I link an issue to an existing TiDB pull request?

Create or identify the issue first, then patch only the Issue Number line in the PR body using full keyword syntax like close #<id> or ref #<id>. Afterward verify the do-not-merge/needs-linked-issue label is removed.