Skip to content

Commit b329337

Browse files
author
Sevastyan Zhukov
authored
Multi-file running changelog strategy (#6740)
1 parent 14571b9 commit b329337

File tree

18 files changed

+421
-623
lines changed

18 files changed

+421
-623
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Assemble changelog
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- release-v**
7+
jobs:
8+
process:
9+
permissions:
10+
pull-requests: write
11+
contents: write
12+
runs-on: ubuntu-20.04
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
ref: ${{github.head_ref}}
19+
20+
- name: setup python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: '3.7.7'
24+
25+
- name: install python packages
26+
run: |
27+
python3 -m pip install requests GitPython
28+
29+
- name: execute py script
30+
run: |
31+
python3 scripts/changelog/assemble_changelog.py
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Rename changelog files
2+
on:
3+
pull_request:
4+
types: [ opened, reopened, ready_for_review, synchronize ]
5+
jobs:
6+
process:
7+
permissions:
8+
pull-requests: write
9+
contents: write
10+
runs-on: ubuntu-20.04
11+
env:
12+
PR_NUMBER: ${{ github.event.pull_request.number }}
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
ref: ${{github.head_ref}}
18+
19+
- name: setup python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: '3.7.7'
23+
24+
- name: install python packages
25+
run: |
26+
python3 -m pip install requests GitPython
27+
28+
- name: execute py script
29+
run: |
30+
python3 scripts/changelog/rename_changelog_file.py

changelog/README.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Multi-file running changelog
2+
3+
To avoid merge conflicts in the CHANGELOG.md file we accepted the multi-file running changelog strategy.
4+
5+
*This strategy works for the libnavui-androidauto project too. It works in the `libnavui-androidauto/changelog` directory*
6+
7+
To follow this strategy you should create a `.md` file for every PR. Choose a directory:
8+
9+
- `changelog/unreleased/features` for **Features** changes
10+
- `changelog/unreleased/bugfixes` for **Bug fixes and improvements** changes
11+
- `changelog/unreleased/issues` for **Known issues :warning:** changes
12+
- `changelog/unreleased/other` for other changes
13+
14+
Or you can use the helper script to do it. Just call `python3 scripts/changelog/add_changelog.py -f "I have added something special"` to create a changelog file.
15+
Call `python3 scripts/changelog/add_changelog.py -h` to get more info.
16+
17+
You can use anything that allow .md format in changelog files.
18+
19+
If you have implemented several features or bugfixes you should describe all of them:
20+
21+
```
22+
- Description of changes in md format
23+
- Description of changes in md format also
24+
```
25+
26+
You can choose any name for your changelog files because the GitHub action will rename files in
27+
`changelog/unreleased/features` and `changelog/unreleased/bugfixes` directories to `${PR_NUMBER}.md` when you open a PR.
28+
29+
Every push to the main or release branch Assemble changelog GitHub action will be executed:
30+
31+
* collect all files from `changelog/unreleased`
32+
* assemble the changelog like:
33+
34+
```
35+
#### Features
36+
- Feature 1 [#1234](https://github.com/mapbox/mapbox-navigation-android/pull/1234)
37+
- Feature 2 [#2345](https://github.com/mapbox/mapbox-navigation-android/pull/2345)
38+
39+
#### Bug fixes and improvements
40+
- Bugfix 3 [#3456](https://github.com/mapbox/mapbox-navigation-android/pull/3456)
41+
- Bugfix 4 [#4567](https://github.com/mapbox/mapbox-navigation-android/pull/4567)
42+
43+
#### Known issues :warning:
44+
- Issue 1
45+
- Issue 2
46+
47+
Some other changes
48+
```
49+
50+
* write the changelog to the `changelog/unreleased/CHANGELOG.md` file
51+
52+
Every release the release train app will:
53+
54+
* get changelog from `changelog/unreleased/CHANGELOG.md` file
55+
* add information about dependencies and compile changelog like:
56+
```
57+
## Mapbox Navigation SDK 1.1.1 - 13 December, 2022
58+
### Changelog
59+
[Changes between v1.1.0 and v1.1.1](https://github.com/mapbox/mapbox-navigation-android/compare/v1.1.0...v1.1.1)
60+
61+
#### Features
62+
- Feature 1 [#1234](https://github.com/mapbox/mapbox-navigation-android/pull/1234)
63+
- Feature 2 [#2345](https://github.com/mapbox/mapbox-navigation-android/pull/2345)
64+
65+
#### Bug fixes and improvements
66+
- Bugfix 3 [#3456](https://github.com/mapbox/mapbox-navigation-android/pull/3456)
67+
- Bugfix 4 [#4567](https://github.com/mapbox/mapbox-navigation-android/pull/4567)
68+
69+
#### Known issues :warning:
70+
- Issue 1
71+
- Issue 2
72+
73+
Some other changes
74+
75+
### Mapbox dependencies
76+
This release depends on, and has been tested with, the following Mapbox dependencies:
77+
- Mapbox Maps SDK `v10.8.0` ([release notes](https://github.com/mapbox/mapbox-maps-android/releases/tag/v10.8.0))
78+
- Mapbox Navigation Native `v115.0.1`
79+
- Mapbox Core Common `v23.0.0`
80+
- Mapbox Java `v6.8.0` ([release notes](https://github.com/mapbox/mapbox-java/releases/tag/v6.8.0))
81+
- Mapbox Android Core `v5.0.2` ([release notes](https://github.com/mapbox/mapbox-events-android/releases/tag/core-5.0.2))
82+
```
83+
* add compiled changelog to `CHANGELOG.md` file
84+
* delete all files in `changelog/unreleased` dir

changelog/unreleased/CHANGELOG.md

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Each newly instantiated MapboxRouteArrowView class will initialize the layers with the provided options on the first render call. Previously this would only be done if the layers hadn't already been initialized.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
- :warning: Updated the `NavigationView` default navigation puck asset.
2+
3+
Previous puck can be restored by injecting `LocationPuck2D` with the `bearingImage` set to `com.mapbox.navigation.ui.maps.R.drawable.mapbox_navigation_puck_icon` drawable:
4+
```kotlin
5+
navigationView.customizeViewStyles {
6+
locationPuckOptions = LocationPuckOptions.Builder(context)
7+
.defaultPuck(
8+
LocationPuck2D(
9+
bearingImage = ContextCompat.getDrawable(
10+
context,
11+
com.mapbox.navigation.ui.maps.R.drawable.mapbox_navigation_puck_icon,
12+
)
13+
)
14+
)
15+
.idlePuck(regularPuck(context))
16+
.build()
17+
}
18+
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fixed a rare `java.lang.NullPointerException: Attempt to read from field 'SpeechAnnouncement PlayCallback.announcement' on a null object reference` crash in `PlayCallback.getAnnouncement`.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Added guarantees that route progress with `RouteProgress#currentState == OFF_ROUTE` arrives earlier than `NavigationRerouteController#reroute` is called.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fixed an issue where the first voice instruction might have been played twice.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Introduced `NavigationViewListener.onSpeedInfoClicked` that would be triggered when `MapboxSpeedInfoView` is clicked upon.

0 commit comments

Comments
 (0)