Skip to content

Commit 81559e8

Browse files
authored
pr_template: Provides tips for cherry-pick (#6042) (#6121)
1 parent 8a21780 commit 81559e8

File tree

2 files changed

+37
-12
lines changed

2 files changed

+37
-12
lines changed

.github/pull_request_template.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212

1313
<!-- Fill in "x" in [] to tick the checkbox below.-->
1414

15+
**Tips for choosing the affected version(s):**
16+
17+
By default, **CHOOSE MASTER ONLY** so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, **CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER**.
18+
19+
For details, see [tips for choosing the affected versions](https://github.com/pingcap/docs/blob/master/CONTRIBUTING.md#guideline-for-choosing-the-affected-versions).
20+
1521
- [ ] master (the latest development version)
1622
- [ ] v5.1 (TiDB 5.1 versions)
1723
- [ ] v5.0 (TiDB 5.0 versions)

CONTRIBUTING.md

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ Before you contribute, please take a quick look at some general information abou
2929

3030
### Learn about docs versions
3131

32-
Currently, we maintain six versions of TiDB documentation, each with a separate branch:
32+
Currently, we maintain seven versions of TiDB documentation, each with a separate branch:
3333

3434
| Docs branch name | Version description |
3535
| :--- | :--- |
3636
| `master` branch | the latest development version |
37-
| `release-5.1` branch | the 5.1 version |
37+
| `release-5.1` branch | the 5.1 stable version |
3838
| `release-5.0` branch | the 5.0 stable version |
3939
| `release-4.0` branch | the 4.0 stable version |
4040
| `release-3.1` branch | the 3.1 stable version |
@@ -45,22 +45,24 @@ Currently, we maintain six versions of TiDB documentation, each with a separate
4545
>
4646
> Previously, we maintain all versions in the `master` branch, with directories like `dev` (the latest development version), `v3.0` and so on. Each docs version is updated very frequently and changes to one version often apply to another version or other versions as well.
4747
>
48-
> Since February 21, 2020, to reduce manual editing and updating work among versions, we have started to maintain each version in a separate branch and introduce sre-bot to automatically file PRs to other versions as long as you add corresponding cherry-pick labels to your PR.
48+
> Since February 21, 2020, to reduce manual editing and updating work among versions, we have started to maintain each version in a separate branch and introduced sre-bot (now ti-chi-bot) to automatically file PRs to other versions as long as you add corresponding cherry-pick labels to your PR.
4949
5050
### Use cherry-pick labels
5151

5252
- If your changes apply to only one docs version, just submit a PR to the corresponding version branch.
5353

54-
- If your changes apply to multiple docs versions, you don't have to submit a PR to each branch. Instead, after you submit your PR, trigger the sre-bot to submit a PR to other version branches by adding one or several of the following labels as needed. Once the current PR is merged, sre-bot will start to work.
55-
- `needs-cherry-pick-5.1` label: sre-bot will submit a PR to the `release-5.1` branch.
56-
- `needs-cherry-pick-5.0` label: sre-bot will submit a PR to the `release-5.0` branch.
57-
- `needs-cherry-pick-4.0` label: sre-bot will submit a PR to the `release-4.0` branch.
58-
- `needs-cherry-pick-3.1` label: sre-bot will submit a PR to the `release-3.1` branch.
59-
- `needs-cherry-pick-3.0` label: sre-bot will submit a PR to the `release-3.0` branch.
60-
- `needs-cherry-pick-2.1` label: sre-bot will submit a PR to the `release-2.1` branch.
61-
- `needs-cherry-pick-master` label: sre-bot will submit a PR to the `master` branch.
54+
- If your changes apply to multiple docs versions, you don't have to submit a PR to each branch. Instead, after you submit your PR, trigger the ti-chi-bot to submit a PR to other version branches by adding one or several of the following labels as needed. Once the current PR is merged, ti-chi-bot will start to work.
55+
- `needs-cherry-pick-5.1` label: ti-chi-bot will submit a PR to the `release-5.1` branch.
56+
- `needs-cherry-pick-5.0` label: ti-chi-bot will submit a PR to the `release-5.0` branch.
57+
- `needs-cherry-pick-4.0` label: ti-chi-bot will submit a PR to the `release-4.0` branch.
58+
- `needs-cherry-pick-3.1` label: ti-chi-bot will submit a PR to the `release-3.1` branch.
59+
- `needs-cherry-pick-3.0` label: ti-chi-bot will submit a PR to the `release-3.0` branch.
60+
- `needs-cherry-pick-2.1` label: ti-chi-bot will submit a PR to the `release-2.1` branch.
61+
- `needs-cherry-pick-master` label: ti-chi-bot will submit a PR to the `master` branch.
6262

63-
- If most of your changes apply to multiple docs versions but some differences exist among versions, you still can use cherry-pick labels to let sre-bot create PRs to other versions. After the PR to another version is successfully submitted by sre-bot, you can make changes to that PR.
63+
For how to choose the docs versions, refer to [Guideline for choosing the affected version(s)](#guideline-for-choosing-the-affected-versions).
64+
65+
- If most of your changes apply to multiple docs versions but some differences exist among versions, you still can use cherry-pick labels to let ti-chi-bot create PRs to other versions. After the PR to another version is successfully submitted by ti-chi-bot, you can make changes to that PR.
6466

6567
## How to contribute
6668

@@ -142,6 +144,23 @@ git push -u origin new-branch-name # "-u" is used to track the remote branch fro
142144
143145
Now, your PR is successfully submitted! After this PR is merged, you will automatically become a contributor to TiDB documentation.
144146
147+
## Guideline for choosing the affected version(s)
148+
149+
When you create a Pull Request, you need to choose the release version to which your document change applies in the description template on your Pull Request page.
150+
151+
If your change fits one of the following situations, it is recommended to **CHOOSE THE MASTER BRANCH ONLY**. After the PR is merged, the change will be soon displayed on the [Dev page of the PingCAP documentation website](https://docs.pingcap.com/tidb/dev/). After the next major or minor version of TiDB is released, the change will also be displayed on the website page for the new version.
152+
153+
- Relates to a documentation enhancement, such as supplementing missing or incomplete document contents.
154+
- Fixes inaccurate or incorrect document contents, including values, descriptions, examples, or typos.
155+
- Involves a documentation refactor in a specific topic module.
156+
157+
If your change fits one of the following situations, **CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER**:
158+
159+
- Involves a feature behavior change that relates to a specific version.
160+
- Involves a compatibility change, including changing the default value of a configuration item or a system variable.
161+
- Fixes format to resolve a display error
162+
- Fixes broken links
163+
145164
## Contact
146165
147166
Join the Slack channel: [#sig-docs](https://slack.tidb.io/invite?team=tidb-community&channel=sig-docs&ref=pingcap-docs)

0 commit comments

Comments
 (0)