Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: enhance the release notes #32416

Merged
merged 6 commits into from
Nov 29, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
279 changes: 179 additions & 100 deletions scripts/release-notes.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/release-notes/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function test_end() {
fi

# Check the generated release notes.
(cd $t && $PYTHON $relnotescript --hide-header --hide-downloads-section --from initial --until master) >$t.notes.txt
(cd $t && $PYTHON $relnotescript --hide-header --hide-downloads-section --from initial --until master "$@") >$t.notes.txt
if test -z "$rewrite"; then
diff -u $t.notes.txt $t.notes.ref.txt
else
Expand Down
4 changes: 2 additions & 2 deletions scripts/release-notes/test1.notes.ref.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Bug Fixes
### Bug fixes

- Feature A [#1][#1] [20a33aaf1][20a33aaf1]

Expand All @@ -8,7 +8,7 @@

- [#unknown][#unknown] [e3a1f2c94][e3a1f2c94] master update (test1)

### Doc Updates
### Doc updates

Docs team: Please add these manually.

Expand Down
4 changes: 2 additions & 2 deletions scripts/release-notes/test2.notes.ref.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Bug Fixes
### Bug fixes

- Feature A [#1][#1] [beda26774][beda26774]
- Feature B [#1][#1] [52d1235cc][52d1235cc]
Expand All @@ -9,7 +9,7 @@

- [#unknown][#unknown] [f872999e8][f872999e8] master update (test2)

### Doc Updates
### Doc updates

Docs team: Please add these manually.

Expand Down
4 changes: 2 additions & 2 deletions scripts/release-notes/test3.notes.ref.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Bug Fixes
### Bug fixes

- Feature A [#1][#1] [6a84145e9][6a84145e9]
- Feature C [#1][#1] [0ac9dc576][0ac9dc576]
Expand All @@ -11,7 +11,7 @@

- [#unknown][#unknown] [4f4329fdc][4f4329fdc] master update (test3)

### Doc Updates
### Doc updates

Docs team: Please add these manually.

Expand Down
4 changes: 2 additions & 2 deletions scripts/release-notes/test4.notes.ref.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Bug Fixes
### Bug fixes

- Feature A release note 1

Expand All @@ -11,7 +11,7 @@
- Feature D [#1][#1] [662a10125][662a10125]
- Feature E [#1][#1] [76bb9f090][76bb9f090]

### Doc Updates
### Doc updates

Docs team: Please add these manually.

Expand Down
4 changes: 2 additions & 2 deletions scripts/release-notes/test5.notes.ref.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Bug Fixes
### Bug fixes

- Feature A [#1][#1] [076393957][076393957]

Expand All @@ -8,7 +8,7 @@

- [#2][#2] [8156afc96][8156afc96] PR title in need of release note (test5)

### Doc Updates
### Doc updates

Docs team: Please add these manually.

Expand Down
2 changes: 1 addition & 1 deletion scripts/release-notes/test6.notes.ref.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Doc Updates
### Doc updates

Docs team: Please add these manually.

Expand Down
19 changes: 19 additions & 0 deletions scripts/release-notes/test7.graph.ref.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
* 28245dacd01a6b6fc50245d108d6bd713361c1d7 Merge pull request #200 from foo/bar
|\
| * 78b06acb8baec3e22dc47b4fd978405915400a97 merge pr canary
| * cb718dc99f4eb05d41de1da18fd027b0dc9f96bc Merge #2
| |\
| | * 6da808a53cf9a00fe72e12c2be9712d0f5d81dd4 backport A
| |/
* | ba15054b5e8721606d2203aeb4241dd490696885 Merge pull request #100 from foo/bar
|\ \
| * | 3c612877c5e9dac6a6d06c1161a275c2b2ab7848 merge pr canary
|/ /
* | 191b497b9b62a436e86cded6f98a199b11ec6e65 Merge #1
|\ \
| |/
|/|
| * 57aa2eab630906aa41639fafdfe3cd11fad33bf4 feature B
| * 8b135a6544448ffb9d7977506e889b003f62a921 feature A
|/
* 5d7ea53d1a3340e43c65ef950b3aa8516644e584 initial
31 changes: 31 additions & 0 deletions scripts/release-notes/test7.notes.ref.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
### Bug fixes

- Feature B [#1][#1] [57aa2eab6][57aa2eab6]

### Doc updates

Docs team: Please add these manually.

### Contributors

This release includes 3 merged PRs by 1 author.
We would like to thank the following contributors from the CockroachDB community:

- test7

### PRs merged by contributors

- test7:
- 2018-04-22 [#200 ][#200 ] [28245dacd][28245dacd] (+ 0 - 0 ~ 0/ 0) PR title 2 alternate format (2 commits)
- 2018-04-22 [#100 ][#100 ] [ba15054b5][ba15054b5] (+ 0 - 0 ~ 0/ 0) PR title 1 alternate format
- 2018-04-22 [#1 ][#1 ] [191b497b9][191b497b9] (+ 0 - 0 ~ 0/ 0) PR title 1 (2 commits)


[#1]: https://github.com/cockroachdb/cockroach/pull/1
[#100]: https://github.com/cockroachdb/cockroach/pull/100
[#200]: https://github.com/cockroachdb/cockroach/pull/200
[191b497b9]: https://github.com/cockroachdb/cockroach/commit/191b497b9
[28245dacd]: https://github.com/cockroachdb/cockroach/commit/28245dacd
[57aa2eab6]: https://github.com/cockroachdb/cockroach/commit/57aa2eab6
[ba15054b5]: https://github.com/cockroachdb/cockroach/commit/ba15054b5

40 changes: 40 additions & 0 deletions scripts/release-notes/test7.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/sh
set -eux

. common.sh

t=test7
relnotescript=${1:?}
rewrite=${2:-}

test_init

(
cd $t
init_repo

git checkout -b release-branch
git checkout -b feature1
make_change "feature A

Release note (bug fix): feature A
"
make_change "feature B

Release note (bug fix): feature B
"
tag_pr 1
git checkout master
merge_pr feature1 1 "PR title 1"

git checkout release-branch -b backport
make_change "backport A

Release note (bug fix): feature A
"
tag_pr 2
git checkout release-branch
merge_pr backport 2 "PR title 2"
)

test_end --exclude-from initial --exclude-until release-branch