Skip to content

Commit 0a475de

Browse files
authored
Merge pull request #3278 from jeedom/feat/changelog-develop
Auto-generated draft of release notes / changelog in develop
2 parents 766c122 + b884ea1 commit 0a475de

2 files changed

Lines changed: 158 additions & 0 deletions

File tree

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: Generate draft release notes
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
release-notes:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v6
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Get last tag
23+
id: lasttag
24+
run: |
25+
TAG=$(git describe --tags --abbrev=0)
26+
echo "tag=$TAG" >> $GITHUB_OUTPUT
27+
28+
- name: Get tag date
29+
id: tagdate
30+
run: |
31+
DATE=$(git log -1 --format=%cI ${{ steps.lasttag.outputs.tag }})
32+
echo "date=$DATE" >> $GITHUB_OUTPUT
33+
34+
- name: Generate markdown file
35+
id: genmd
36+
run: |
37+
mkdir -p docs
38+
39+
echo "# All changes since release ${{ steps.lasttag.outputs.tag }}" > docs/release-notes.md
40+
echo "" >> docs/release-notes.md
41+
PRS_JSON=$(gh pr list \
42+
--state merged \
43+
--base develop \
44+
--search "merged:>${{ steps.tagdate.outputs.date }}" \
45+
--json number,title,mergedAt,url,labels)
46+
47+
add_section() {
48+
local title="$1"
49+
local label="$2"
50+
local rows
51+
52+
echo "## $title" >> docs/release-notes.md
53+
54+
rows=$(echo "$PRS_JSON" | jq -r --arg label "$label" '
55+
map(select((.title | startswith("[CI]")) | not))
56+
| map(select(any(.labels[]?; (.name | ascii_downcase) == ($label | ascii_downcase))))
57+
| sort_by(.mergedAt) | reverse | .[]
58+
| "| \(.mergedAt | fromdateiso8601 | strflocaltime("%Y-%m-%d %H:%M:%S")) | \(.title | gsub("\\|"; "\\\\|")) | [#\(.number)](\(.url)) |"
59+
')
60+
61+
if [ -z "$rows" ]; then
62+
echo "no entries" >> docs/release-notes.md
63+
else
64+
echo "| Merge date | Title | PR |" >> docs/release-notes.md
65+
echo "| --- | --- | --- |" >> docs/release-notes.md
66+
echo "$rows" >> docs/release-notes.md
67+
fi
68+
69+
echo "" >> docs/release-notes.md
70+
}
71+
72+
add_section "New core features" "changelog-feat"
73+
add_section "Breaking changes" "changelog-breaking"
74+
add_section "Fixes" "changelog-fix"
75+
add_section "Others" "changelog-other"
76+
add_section "Documentations" "changelog-docs"
77+
add_section "Developer" "changelog-dev"
78+
79+
UNCATEGORIZED_ROWS=$(echo "$PRS_JSON" | jq -r '
80+
map(select((.title | startswith("[CI]")) | not))
81+
| map(select(
82+
((any(.labels[]?; (.name | ascii_downcase) == "changelog-feat")) | not) and
83+
((any(.labels[]?; (.name | ascii_downcase) == "changelog-breaking")) | not) and
84+
((any(.labels[]?; (.name | ascii_downcase) == "changelog-fix")) | not) and
85+
((any(.labels[]?; (.name | ascii_downcase) == "changelog-other")) | not) and
86+
((any(.labels[]?; (.name | ascii_downcase) == "changelog-docs")) | not) and
87+
((any(.labels[]?; (.name | ascii_downcase) == "changelog-dev")) | not)
88+
))
89+
| sort_by(.mergedAt) | reverse | .[]
90+
| "| \(.mergedAt | fromdateiso8601 | strflocaltime("%Y-%m-%d %H:%M:%S")) | \(.title | gsub("\\|"; "\\\\|")) | [#\(.number)](\(.url)) |"
91+
')
92+
if [ -n "$UNCATEGORIZED_ROWS" ]; then
93+
echo "## Uncategorized" >> docs/release-notes.md
94+
echo "| Merge date | Title | PR |" >> docs/release-notes.md
95+
echo "| --- | --- | --- |" >> docs/release-notes.md
96+
echo "$UNCATEGORIZED_ROWS" >> docs/release-notes.md
97+
fi
98+
99+
env:
100+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101+
TZ: Europe/Paris
102+
103+
- name: Commit markdown file
104+
run: |
105+
git config user.name "github-actions"
106+
git config user.email "github-actions@github.com"
107+
108+
git add docs/release-notes.md
109+
110+
if git diff --cached --quiet; then
111+
echo "No changes to commit"
112+
exit 0
113+
fi
114+
115+
git commit -m "Update release-notes.md [skip ci]"
116+
git push

docs/release-notes.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# All changes since release 4.5.3
2+
3+
## New core features
4+
| Merge date | Title | PR |
5+
| --- | --- | --- |
6+
| 2026-04-19 15:18:24 | Add healthcheck in the docker container | [#2998](https://github.com/jeedom/core/pull/2998) |
7+
8+
## Breaking changes
9+
no entries
10+
11+
## Fixes
12+
| Merge date | Title | PR |
13+
| --- | --- | --- |
14+
| 2026-04-19 20:34:27 | Rename count variable to count_functionality | [#3273](https://github.com/jeedom/core/pull/3273) |
15+
| 2026-04-19 08:25:34 | fix: prevent a possible SQL injection in setComponentOrder | [#3267](https://github.com/jeedom/core/pull/3267) |
16+
| 2026-04-17 15:14:11 | fix: display_name field (ui) | [#3262](https://github.com/jeedom/core/pull/3262) |
17+
| 2026-04-17 14:01:55 | fix: scenario self execute mixing tags | [#3255](https://github.com/jeedom/core/pull/3255) |
18+
| 2026-04-17 09:35:39 | fix: Suppression des arguments superflus dans les appels de méthodes (PHPStan lvl 1) | [#3258](https://github.com/jeedom/core/pull/3258) |
19+
| 2026-04-17 09:35:16 | fix: Correction des méthodes statiques et du nommage de classes (PHPStan lvl 1) | [#3259](https://github.com/jeedom/core/pull/3259) |
20+
| 2026-04-16 13:05:53 | Fix: issue displaying history if grouping type is set | [#3242](https://github.com/jeedom/core/pull/3242) |
21+
| 2026-04-03 08:46:58 | fix: randText function | [#3197](https://github.com/jeedom/core/pull/3197) |
22+
| 2026-04-02 14:13:11 | fix: resolve 3 bugs in proxy configuration in jsonrpcClient | [#3238](https://github.com/jeedom/core/pull/3238) |
23+
| 2026-03-31 20:51:42 | fix: graphUpdate function in history class | [#3178](https://github.com/jeedom/core/pull/3178) |
24+
25+
## Others
26+
| Merge date | Title | PR |
27+
| --- | --- | --- |
28+
| 2026-04-08 09:16:23 | chore: Correction *aucun* script | [#3246](https://github.com/jeedom/core/pull/3246) |
29+
| 2026-04-04 07:56:05 | chore: typo Securité | [#3241](https://github.com/jeedom/core/pull/3241) |
30+
31+
## Documentations
32+
no entries
33+
34+
## Developer
35+
| Merge date | Title | PR |
36+
| --- | --- | --- |
37+
| 2026-04-17 21:11:17 | new workflow for translations | [#3251](https://github.com/jeedom/core/pull/3251) |
38+
| 2026-04-17 12:26:56 | Fix PHPStan workflow on branch deletion | [#3263](https://github.com/jeedom/core/pull/3263) |
39+
| 2026-04-16 22:32:24 | Use Composer dependency for PHPStan | [#3256](https://github.com/jeedom/core/pull/3256) |
40+
| 2026-04-13 08:16:53 | feat: improve "do not remove log" feature | [#3245](https://github.com/jeedom/core/pull/3245) |
41+
| 2026-04-03 15:27:29 | Update GitHub workflows to use 'develop' branch instead of 'alpha' and 'beta' | [#3240](https://github.com/jeedom/core/pull/3240) |
42+

0 commit comments

Comments
 (0)