Skip to content

Commit 0732085

Browse files
authored
Polishing changelog update doc (#15167)
Polishing changelog update doc changelog: none r? @flip1995
2 parents a53144e + f3b3c09 commit 0732085

File tree

2 files changed

+11
-23
lines changed

2 files changed

+11
-23
lines changed

book/src/development/infrastructure/backport.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@ worth backporting this.
109109
When a PR is backported to Rust `beta`, label the PR with `beta-accepted`. This
110110
will then get picked up when [writing the changelog].
111111

112-
[writing the changelog]: changelog_update.md#31-include-beta-accepted-prs
112+
[writing the changelog]: changelog_update.md#4-include-beta-accepted-prs

book/src/development/infrastructure/changelog_update.md

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Usually you want to write the changelog of the **upcoming stable release**. Make
3838
sure though, that `beta` was already branched in the Rust repository.
3939

4040
To find the commit hash, issue the following command when in a `rust-lang/rust`
41-
checkout:
41+
checkout (most of the time on the `upstream/beta` branch):
4242
```
4343
git log --oneline -- src/tools/clippy/ | grep -o "Merge commit '[a-f0-9]*' into .*" | head -1 | sed -e "s/Merge commit '\([a-f0-9]*\)' into .*/\1/g"
4444
```
@@ -48,16 +48,13 @@ git log --oneline -- src/tools/clippy/ | grep -o "Merge commit '[a-f0-9]*' into
4848
Once you've got the correct commit range, run
4949

5050
```
51-
util/fetch_prs_between.sh commit1 commit2 > changes.txt
51+
util/fetch_prs_between.sh start_commit end_commit > changes.txt
5252
```
5353

54-
where `commit2` is the commit hash from the previous command and `commit1`
55-
is the commit hash from the current CHANGELOG file.
54+
where `end_commit` is the commit hash from the previous command and `start_commit`
55+
is [the commit hash][beta_section] from the current CHANGELOG file.
5656
Open `changes.txt` file in your editor of choice.
5757

58-
When updating the changelog it's also a good idea to make sure that `commit1` is
59-
already correct in the current changelog.
60-
6158
### 3. Authoring the final changelog
6259

6360
The above script should have dumped all the relevant PRs to the file you
@@ -70,17 +67,7 @@ With the PRs filtered, you can start to take each PR and move the `changelog: `
7067
content to `CHANGELOG.md`. Adapt the wording as you see fit but try to keep it
7168
somewhat coherent.
7269

73-
The order should roughly be:
74-
75-
1. New lints
76-
2. Moves or deprecations of lints
77-
3. Changes that expand what code existing lints cover
78-
4. False positive fixes
79-
5. ICE fixes
80-
6. Documentation improvements
81-
7. Others
82-
83-
As section headers, we use:
70+
The sections order should roughly be:
8471

8572
```
8673
### New Lints
@@ -97,10 +84,10 @@ As section headers, we use:
9784
### Others
9885
```
9986

100-
Please also be sure to update the Beta/Unreleased sections at the top with the
101-
relevant commit ranges.
87+
Please also be sure to update [the `Unreleased/Beta/In Rust Nightly` section][beta_section] at the top with the
88+
relevant commits ranges and to add the `Rust <version>` section with release date and PR ranges.
10289

103-
#### 3.1 Include `beta-accepted` PRs
90+
### 4. Include `beta-accepted` PRs
10491

10592
Look for the [`beta-accepted`] label and make sure to also include the PRs with
10693
that label in the changelog. If you can, remove the `beta-accepted` labels
@@ -109,7 +96,7 @@ that label in the changelog. If you can, remove the `beta-accepted` labels
10996
> _Note:_ Some of those PRs might even get backported to the previous `beta`.
11097
> Those have to be included in the changelog of the _previous_ release.
11198
112-
### 4. Update `clippy::version` attributes
99+
### 5. Update `clippy::version` attributes
113100

114101
Next, make sure to check that the `#[clippy::version]` attributes for the added
115102
lints contain the correct version.
@@ -129,3 +116,4 @@ written for. If not, update the version to the changelog version.
129116
[rust_beta_tools]: https://github.com/rust-lang/rust/tree/beta/src/tools/clippy
130117
[rust_stable_tools]: https://github.com/rust-lang/rust/releases
131118
[`beta-accepted`]: https://github.com/rust-lang/rust-clippy/issues?q=label%3Abeta-accepted+
119+
[beta_section]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#unreleased--beta--in-rust-nightly

0 commit comments

Comments
 (0)