Skip to content

Commit 382c89c

Browse files
committed
chore: fix changelog generator
1 parent 7d63a9a commit 382c89c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/generateChangelog.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ if (fs.existsSync(commitUserFile)) {
4949
commitUserLookup = JSON.parse(fs.readFileSync(commitUserFile, 'utf8'));
5050
}
5151

52-
const whiteLabels = zhc.definitions.filter((d) => d.whiteLabel).flatMap((d) => d.whiteLabel);
52+
const definitions = require('zigbee-herdsman-converters/devices/index').default.map((d) => zhc.prepareDefinition(d));
53+
const whiteLabels = definitions.filter((d) => d.whiteLabel).flatMap((d) => d.whiteLabel);
5354
const capitalizeFirstChar = (str) => str.charAt(0).toUpperCase() + str.slice(1);
5455

5556
for (const changelog of changelogs) {
@@ -97,7 +98,7 @@ for (const changelog of changelogs) {
9798

9899
if (localContext === 'add') {
99100
for (const model of message.split(',')) {
100-
const definition = zhc.definitions.find((d) => d.model === model.trim());
101+
const definition = definitions.find((d) => d.model === model.trim());
101102
const whiteLabel = whiteLabels.find((d) => d.model === model.trim());
102103
const match = definition || whiteLabel;
103104
if (match) {

0 commit comments

Comments
 (0)