Skip to content

Commit 4186cbf

Browse files
authored
[core] auto create release notes with every push on develop (#3985)
and remove CHANGELOG.md logic. This is my attempt to create a draft release instead of editing a changelog, see discussion on discord. Logic: - new github workflow `.github/workflows/release-notes.yaml` - runs with every push on `develop` (so after PR's are merged) - collects the commits on `develop` which are newer than the latest tag - searches the commit messages for keywords defined in an array and group the messages into categories (this is a first shot, we will update this ...) - creates markdown content - looks for an untagged and unpublished draft release with name `unreleased`, if it exists, it will be deleted - creates an untagged and unpublished draft release with name `unreleased` with markdown content created above Example created on my fork (this caused having `MagicMirrorOrg` in the PR-Links): <img width="952" height="1804" alt="grafik" src="https://github.com/user-attachments/assets/38687bed-f5da-4dcb-93eb-242c317769df" /> Please review this PR, it is a draft release at the moment because I got problems in my fork where I tested this: The created draft release is not visible at the moment (they are visible via api). AFAIS this is a queue problem on GitHub, maybe I flooded their queue while testing ... So I will test this tomorrow again before removing `draft` here.
1 parent c2ec6fc commit 4186cbf

File tree

8 files changed

+248
-78
lines changed

8 files changed

+248
-78
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Hello and thank you for wanting to contribute to the MagicMirror² project!
22

3-
**Please make sure that you have followed these 4 rules before submitting your Pull Request:**
3+
**Please make sure that you have followed these 3 rules before submitting your Pull Request:**
44

55
> 1. Base your pull requests against the `develop` branch.
66
> 2. Include these infos in the description:
@@ -12,8 +12,6 @@ Hello and thank you for wanting to contribute to the MagicMirror² project!
1212
>
1313
> 3. Please run `node --run lint:prettier` before submitting so that
1414
> style issues are fixed.
15-
> 4. Don't forget to add an entry about your changes to
16-
> the CHANGELOG.md file.
1715
1816
**Note**: Sometimes the development moves very fast. It is highly
1917
recommended that you update your branch of `develop` before creating a

.github/dependabot.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ updates:
66
interval: "weekly"
77
target-branch: "develop"
88
labels:
9-
- "Skip Changelog"
109
- "dependencies"
1110

1211
- package-ecosystem: "npm"
@@ -15,6 +14,5 @@ updates:
1514
interval: "monthly"
1615
target-branch: "develop"
1716
labels:
18-
- "Skip Changelog"
1917
- "dependencies"
2018
- "javascript"

.github/workflows/enforce-pullrequest-rules.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# This workflow enforces on every pull request:
2-
# - the update of our CHANGELOG.md file, see: https://github.com/dangoslen/changelog-enforcer
3-
# - that the PR is not based against master, taken from https://github.com/oppia/oppia-android/pull/2832/files
1+
# This workflow enforces on every pull request that the PR is not based against master,
2+
# taken from https://github.com/oppia/oppia-android/pull/2832/files
43

54
name: "Enforce Pull-Request Rules"
65

@@ -13,11 +12,6 @@ jobs:
1312
runs-on: ubuntu-latest
1413
timeout-minutes: 10
1514
steps:
16-
- name: "Enforce changelog"
17-
uses: dangoslen/changelog-enforcer@v3
18-
with:
19-
changeLogPath: "CHANGELOG.md"
20-
skipLabels: "Skip Changelog"
2115
- name: "Enforce develop branch"
2216
if: ${{ github.event.pull_request.base.ref == 'master' && !contains(github.event.pull_request.labels.*.name, 'mastermerge') }}
2317
run: |
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow writes a draft release on GitHub named `unreleased` after every push on develop
2+
3+
name: "Create Release Notes"
4+
5+
on:
6+
push:
7+
branches: [develop]
8+
9+
permissions:
10+
contents: write
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
release-notes:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 15
20+
steps:
21+
- name: "Checkout code"
22+
uses: actions/checkout@v6
23+
with:
24+
fetch-depth: "0"
25+
- name: "Use Node.js"
26+
uses: actions/setup-node@v6
27+
with:
28+
node-version: lts/*
29+
cache: "npm"
30+
- name: "Create Markdown content"
31+
run: |
32+
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
33+
node js/releasenotes.js

CHANGELOG.md

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
❤️ **Donate:** Enjoying MagicMirror²? [Please consider a donation!](https://magicmirror.builders/#donate) With your help we can continue to improve the MagicMirror².
99

10-
## [2.34.0] - unreleased
10+
## Obsolete
1111

12-
planned for 2026-01-01
13-
14-
### Added
15-
16-
- [weather] feat: add configurable forecast date format option (#3918)
17-
- [core] Add new `server:watch` script to run MagicMirror² server-only with automatic restarts when files (defined in `config.watchTargets`) change (#3920)
18-
- [weather] add error handling to fetch functions including cors (#3791)
19-
- [l10n] Add Portuguese (Portugal & Brazil) translations for alert module, Refine Portuguese (Portugal) translations
20-
21-
### Removed
22-
23-
- [weather] Removed deprecated `ukmetoffice` datapoint provider (#3842, #3952)
24-
25-
### Changed
26-
27-
- [core] refactor: replace `module-alias` dependency with internal alias resolver (#3893)
28-
- [check_config] refactor: improve error handling (#3927)
29-
- [calendar] test: remove "Recurring event per timezone" test (#3929)
30-
- [calendar] chore: remove `requiresVersion: "2.1.0"` (#3932)
31-
- [tests] migrate from `jest` to `vitest` (#3940, #3941)
32-
- [ci] Add concurrency to automated tests workflow to cancel outdated runs (#3943)
33-
- [tests] replace `node-libgpiod` with `serialport` in electron-rebuild workflow (#3945)
34-
- [calendar] hide repeatingCountTitle if the event count is zero (#3949)
35-
- [weatherprovider] update override warning wording (#3914)
36-
- [core] configure cspell to check default modules only and fix typos (#3955)
37-
- [core] refactor: replace `XMLHttpRequest` with `fetch` in `translator.js` (#3950)
38-
- [tests] migrate e2e tests to Playwright (#3950)
39-
- [calendar] refactor: migrate CalendarFetcher to ES6 class and improve error handling (#3958)
40-
- [gitignore] cleanup/simplify .gitignore (#3952, #3954, #3968, #3969)
41-
- [compliments] refactor: optimize `loadComplimentFile` method and add unit tests(#3969)
42-
- [core] chore: simplify Wayland start script (#3974)
43-
- [calendar] refactor: simplify recurring event handling and event exclusion logic (#3976)
44-
45-
### Fixed
46-
47-
- feat: add ESlint rule `no-sparse-arrays` for config check to fix #3910 (#3911)
48-
- fixed eslint warnings shown in #3911 and updated npm publish docs (#3913)
49-
- [core] refactor: replace `express-ipfilter` with lightweight custom middleware (#3917) - This fixes security issue [CVE-2023-42282](https://github.com/advisories/GHSA-78xj-cgh5-2h22), which is not very likely to be exploitable in MagicMirror² setups, but still should be fixed.
50-
- fixed the Environment Canada weather URL (#3912) and now converts a windspeed of 'calm' to 0
51-
- fixed problems with daylight-saving-time in weather provider `openmeto` (#3930, #3931)
52-
- [newsfeed] fixed header layout issue introduced with prettier njk linting (#3946)
53-
- [weather] fixed windy icon not showing up in pirateweather (#3957)
54-
- [compliments] fixed duplicate query param "?" when constructing refresh url (#3967)
55-
- [compliments] fixed compliments remote file minimum delay to be 15 minutes (#3970)
56-
- [calendar] prevent excessive fetching with smart refresh strategy (#3976)
57-
58-
### Updated
59-
60-
- [core] Update dependencies incl. electron to v39 (#3909, #3916, #3921, #3925, #3934, #3982)
61-
- [logger] Add prefixes to most Log messages (#3923, #3926)
12+
This file is no longer being updated. Release notes are now automatically generated via a GitHub action.
6213

6314
## [2.33.0] - 2025-10-01
6415

@@ -1877,7 +1828,6 @@ It includes (but is not limited to) the following features:
18771828

18781829
This was part of the blogpost: [https://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the](https://michaelteeuw.nl/post/83916869600/magic-mirror-part-vi-production-of-the)
18791830

1880-
[2.34.0]: https://github.com/MagicMirrorOrg/MagicMirror/compare/v2.33.0...develop
18811831
[2.33.0]: https://github.com/MagicMirrorOrg/MagicMirror/compare/v2.32.0...v2.33.0
18821832
[2.32.0]: https://github.com/MagicMirrorOrg/MagicMirror/compare/v2.31.0...v2.32.0
18831833
[2.31.0]: https://github.com/MagicMirrorOrg/MagicMirror/compare/v2.30.0...v2.31.0

Collaboration.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,28 @@ Are done by
3434
- [ ] create `prep-release` branch from `develop`
3535
- [ ] update `package.json` and `package-lock.json` to reflect correct version number `2.xx.0`
3636
- [ ] test `prep-release` branch
37-
- [ ] update `CHANGELOG.md`
38-
- [ ] add all contributor names: `...`
39-
- [ ] add min. node version: > ⚠️ This release needs nodejs version `v22.20.0` or higher
40-
- [ ] check release link at the bottom of the file
4137
- [ ] commit and push all changes
4238
- [ ] create pull request from `prep-release` to `develop` branch with title `Prepare Release 2.xx.0`
4339
- [ ] after successful test run via github actions: merge pull request to `develop`
40+
- [ ] review the content of the automatically generated draft release named `unreleased`
41+
- [ ] check contributor names
42+
- [ ] check auto generated min. node version and adjust it for better readability if necessary
43+
- [ ] check if all elements are assigned to the correct category
44+
- [ ] change release name to `v2.xx.0`
4445
- [ ] after successful test run via github actions: create pull request from `develop` to `master` branch
4546
- [ ] add label `mastermerge`
4647
- [ ] title of the PR is `Release 2.xx.0`
47-
- [ ] description of the PR is the section of the `CHANGELOG.md`
48+
- [ ] description of the PR is the body of the draft release with name `v2.xx.0`
4849
- [ ] after PR tests run without issues, merge PR
49-
- [ ] create new release with
50-
- [ ] corresponding version tag `v2.xx.0`
51-
- [ ] a release name: `...`
52-
- [ ] description of the release is the section of the `CHANGELOG.md`
50+
- [ ] edit draft release with name `v2.xx.0`
51+
- [ ] set corresponding version tag `v2.xx.0` (with `Select tag` and then `Create new tag`)
52+
- [ ] update release link in `Compare to previous Release` by replacing `develop` with new tag `v2.xx.0`
53+
- [ ] publish the release (button at the bottom)
5354

5455
### Draft new development release
5556

5657
- [ ] checkout `develop` branch
5758
- [ ] update `package.json` and `package-lock.json` to reflect correct version number `2.xx.0-develop`
58-
- [ ] draft new section in `CHANGELOG.md`
59-
- [ ] create new release link at the bottom of the file
6059
- [ ] commit and push `develop` branch
6160
- [ ] if new release will be in January, update the year in LICENSE.md
6261

js/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function App () {
158158
const deprecatedOptions = deprecated.configs;
159159
const usedDeprecated = deprecatedOptions.filter((option) => userConfig.hasOwnProperty(option));
160160
if (usedDeprecated.length > 0) {
161-
Log.warn(`WARNING! Your config is using deprecated option(s): ${usedDeprecated.join(", ")}. Check README and CHANGELOG for more up-to-date ways of getting the same functionality.`);
161+
Log.warn(`WARNING! Your config is using deprecated option(s): ${usedDeprecated.join(", ")}. Check README and Documentation for more up-to-date ways of getting the same functionality.`);
162162
}
163163

164164
// check for deprecated module options
@@ -167,7 +167,7 @@ function App () {
167167
const deprecatedModuleOptions = deprecated[element.module];
168168
const usedDeprecatedModuleOptions = deprecatedModuleOptions.filter((option) => element.config.hasOwnProperty(option));
169169
if (usedDeprecatedModuleOptions.length > 0) {
170-
Log.warn(`WARNING! Your config for module ${element.module} is using deprecated option(s): ${usedDeprecatedModuleOptions.join(", ")}. Check README and CHANGELOG for more up-to-date ways of getting the same functionality.`);
170+
Log.warn(`WARNING! Your config for module ${element.module} is using deprecated option(s): ${usedDeprecatedModuleOptions.join(", ")}. Check README and Documentation for more up-to-date ways of getting the same functionality.`);
171171
}
172172
}
173173
}

0 commit comments

Comments
 (0)