[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.
This commit is contained in:
Karsten Hassel
2025-12-10 18:56:31 +01:00
committed by GitHub
parent c2ec6fc2b9
commit 4186cbf0b2
8 changed files with 248 additions and 78 deletions

View File

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

View File

@@ -6,7 +6,6 @@ updates:
interval: "weekly"
target-branch: "develop"
labels:
- "Skip Changelog"
- "dependencies"
- package-ecosystem: "npm"
@@ -15,6 +14,5 @@ updates:
interval: "monthly"
target-branch: "develop"
labels:
- "Skip Changelog"
- "dependencies"
- "javascript"

View File

@@ -1,6 +1,5 @@
# This workflow enforces on every pull request:
# - the update of our CHANGELOG.md file, see: https://github.com/dangoslen/changelog-enforcer
# - that the PR is not based against master, taken from https://github.com/oppia/oppia-android/pull/2832/files
# This workflow enforces on every pull request that the PR is not based against master,
# taken from https://github.com/oppia/oppia-android/pull/2832/files
name: "Enforce Pull-Request Rules"
@@ -13,11 +12,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: "Enforce changelog"
uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: "CHANGELOG.md"
skipLabels: "Skip Changelog"
- name: "Enforce develop branch"
if: ${{ github.event.pull_request.base.ref == 'master' && !contains(github.event.pull_request.labels.*.name, 'mastermerge') }}
run: |

33
.github/workflows/release-notes.yaml vendored Normal file
View File

@@ -0,0 +1,33 @@
# This workflow writes a draft release on GitHub named `unreleased` after every push on develop
name: "Create Release Notes"
on:
push:
branches: [develop]
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release-notes:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: "Checkout code"
uses: actions/checkout@v6
with:
fetch-depth: "0"
- name: "Use Node.js"
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: "npm"
- name: "Create Markdown content"
run: |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
node js/releasenotes.js