@iobroker/repochecker 5.12.0 → 5.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/lib/M3000_Testing.js +18 -29
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,9 @@ Example:
|
|
|
25
25
|
Placeholder for the next version (at the beginning of the line):
|
|
26
26
|
### **WORK IN PROGRESS**
|
|
27
27
|
-->
|
|
28
|
+
### 5.12.1 (2026-05-20)
|
|
29
|
+
- (mcm197) cleanup some duplicate numbers
|
|
30
|
+
|
|
28
31
|
### 5.12.0 (2026-05-20)
|
|
29
32
|
|
|
30
33
|
- (@copilot) Added `[S6022]`: suggest adding a link to `CHANGELOG_OLD.md` in `README.md` when the file exists but no reference to it is found in the readme.
|
package/lib/M3000_Testing.js
CHANGED
|
@@ -67,32 +67,24 @@ function findTagTriggeredRun(workflowRuns, version, taggedVersion) {
|
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
function checkTagTriggeredRun(
|
|
71
|
-
context,
|
|
72
|
-
workflowRuns,
|
|
73
|
-
version,
|
|
74
|
-
taggedVersion,
|
|
75
|
-
errorCodeBase,
|
|
76
|
-
warningCodeBase,
|
|
77
|
-
sourceLabel,
|
|
78
|
-
) {
|
|
70
|
+
function checkTagTriggeredRun(context, workflowRuns, version, taggedVersion, codeBase, sourceLabel) {
|
|
79
71
|
const tagRun = findTagTriggeredRun(workflowRuns, version, taggedVersion);
|
|
80
72
|
const workflowUrl = `${context.githubUrlOriginal}/actions/workflows/${WORKFLOW_FILE_SHORT}`;
|
|
81
73
|
if (!tagRun) {
|
|
82
74
|
context.warnings.push(
|
|
83
|
-
`[${
|
|
84
|
-
`
|
|
75
|
+
`[S${codeBase}] No workflow run for "${WORKFLOW_FILE_SHORT}" triggered by tag "${taggedVersion}" was found for ${sourceLabel}. ` +
|
|
76
|
+
`Workflow logs might be deleted already.`,
|
|
85
77
|
);
|
|
86
78
|
return;
|
|
87
79
|
}
|
|
88
80
|
|
|
89
81
|
if (tagRun.conclusion === 'cancelled') {
|
|
90
82
|
context.warnings.push(
|
|
91
|
-
`[${
|
|
83
|
+
`[W${codeBase}] Workflow "${WORKFLOW_FILE_SHORT}" run triggered by tag "${taggedVersion}" for ${sourceLabel} was cancelled ${formatRunLink(tagRun)}.`,
|
|
92
84
|
);
|
|
93
85
|
} else if (tagRun.conclusion === 'failure') {
|
|
94
86
|
context.errors.push(
|
|
95
|
-
`[${
|
|
87
|
+
`[W${codeBase}] Workflow "${WORKFLOW_FILE_SHORT}" run triggered by tag "${taggedVersion}" for ${sourceLabel} failed ${formatRunLink(tagRun)}.`,
|
|
96
88
|
);
|
|
97
89
|
} else {
|
|
98
90
|
context.checks.push(
|
|
@@ -454,7 +446,7 @@ async function checkTests(context) {
|
|
|
454
446
|
context.checks.push('Workflow concurrency configuration is correct.');
|
|
455
447
|
}
|
|
456
448
|
|
|
457
|
-
// ---
|
|
449
|
+
// --- check runs ---
|
|
458
450
|
try {
|
|
459
451
|
const workflowRunsResponse = await axios(
|
|
460
452
|
`${context.githubUrlApi}/actions/workflows/${WORKFLOW_FILE_SHORT}/runs?per_page=100`,
|
|
@@ -463,17 +455,17 @@ async function checkTests(context) {
|
|
|
463
455
|
if (!Array.isArray(workflowRuns) || workflowRuns.length === 0) {
|
|
464
456
|
const workflowUrl = `${context.githubUrlOriginal}/actions/workflows/${WORKFLOW_FILE_SHORT}`;
|
|
465
457
|
context.warnings.push(
|
|
466
|
-
`[
|
|
458
|
+
`[W3031] No workflow runs found for "${WORKFLOW_FILE_SHORT}". Please check [${workflowUrl}](${workflowUrl}).`,
|
|
467
459
|
);
|
|
468
460
|
} else {
|
|
469
461
|
const lastRun = workflowRuns[0];
|
|
470
462
|
if (lastRun.conclusion === 'cancelled') {
|
|
471
463
|
context.warnings.push(
|
|
472
|
-
`[
|
|
464
|
+
`[W3031] Latest workflow run of "${WORKFLOW_FILE_SHORT}" was cancelled ${formatRunLink(lastRun)}.`,
|
|
473
465
|
);
|
|
474
466
|
} else if (lastRun.conclusion === 'failure') {
|
|
475
467
|
context.errors.push(
|
|
476
|
-
`[
|
|
468
|
+
`[E3031] Latest workflow run of "${WORKFLOW_FILE_SHORT}" failed ${formatRunLink(lastRun)}.`,
|
|
477
469
|
);
|
|
478
470
|
} else {
|
|
479
471
|
context.checks.push(
|
|
@@ -493,7 +485,7 @@ async function checkTests(context) {
|
|
|
493
485
|
const currentReleaseTag = findTagNameForVersion(tags, currentRelease);
|
|
494
486
|
if (!currentReleaseTag) {
|
|
495
487
|
context.warnings.push(
|
|
496
|
-
`[
|
|
488
|
+
`[W3032] Release ${currentRelease} from io-package.json/package.json has not yet been tagged. Tagging releases is required.`,
|
|
497
489
|
);
|
|
498
490
|
} else {
|
|
499
491
|
checkTagTriggeredRun(
|
|
@@ -501,8 +493,7 @@ async function checkTests(context) {
|
|
|
501
493
|
workflowRuns,
|
|
502
494
|
currentRelease,
|
|
503
495
|
currentReleaseTag,
|
|
504
|
-
'
|
|
505
|
-
'W3030',
|
|
496
|
+
'3032',
|
|
506
497
|
`current release ${currentRelease}`,
|
|
507
498
|
);
|
|
508
499
|
}
|
|
@@ -512,7 +503,7 @@ async function checkTests(context) {
|
|
|
512
503
|
const adapterName = typeof context.adapterName === 'string' ? context.adapterName : '';
|
|
513
504
|
if (!/^[a-z0-9][a-z0-9._-]*$/i.test(adapterName)) {
|
|
514
505
|
context.warnings.push(
|
|
515
|
-
`[
|
|
506
|
+
`[W3033] Could not validate npm release information because adapter name "${adapterName}" is not in a valid npm package name format.`,
|
|
516
507
|
);
|
|
517
508
|
} else {
|
|
518
509
|
const npmPackageName = `iobroker.${adapterName}`;
|
|
@@ -524,7 +515,7 @@ async function checkTests(context) {
|
|
|
524
515
|
const npmLatestTag = findTagNameForVersion(tags, npmLatestRelease);
|
|
525
516
|
if (!npmLatestTag) {
|
|
526
517
|
context.errors.push(
|
|
527
|
-
`[
|
|
518
|
+
`[E3034] Release ${npmLatestRelease} tagged as "latest" at npm has not yet been tagged at GitHub. Tagging of releases is required.`,
|
|
528
519
|
);
|
|
529
520
|
} else {
|
|
530
521
|
checkTagTriggeredRun(
|
|
@@ -532,8 +523,7 @@ async function checkTests(context) {
|
|
|
532
523
|
workflowRuns,
|
|
533
524
|
npmLatestRelease,
|
|
534
525
|
npmLatestTag,
|
|
535
|
-
'
|
|
536
|
-
'W3032',
|
|
526
|
+
'3035',
|
|
537
527
|
`npm latest release ${npmLatestRelease}`,
|
|
538
528
|
);
|
|
539
529
|
}
|
|
@@ -544,7 +534,7 @@ async function checkTests(context) {
|
|
|
544
534
|
const newestNpmTag = findTagNameForVersion(tags, newestNpmRelease);
|
|
545
535
|
if (!newestNpmTag) {
|
|
546
536
|
context.errors.push(
|
|
547
|
-
`[
|
|
537
|
+
`[E3036] Newest npm release ${newestNpmRelease} has not yet been tagged at GitHub. Tagging of releases is required.`,
|
|
548
538
|
);
|
|
549
539
|
} else {
|
|
550
540
|
checkTagTriggeredRun(
|
|
@@ -552,8 +542,7 @@ async function checkTests(context) {
|
|
|
552
542
|
workflowRuns,
|
|
553
543
|
newestNpmRelease,
|
|
554
544
|
newestNpmTag,
|
|
555
|
-
'
|
|
556
|
-
'W3034',
|
|
545
|
+
'3037',
|
|
557
546
|
`newest npm release ${newestNpmRelease}`,
|
|
558
547
|
);
|
|
559
548
|
}
|
|
@@ -561,13 +550,13 @@ async function checkTests(context) {
|
|
|
561
550
|
}
|
|
562
551
|
} catch (e) {
|
|
563
552
|
context.warnings.push(
|
|
564
|
-
`[
|
|
553
|
+
`[W3038] Could not retrieve npm release information for testing checks: ${e.message}`,
|
|
565
554
|
);
|
|
566
555
|
}
|
|
567
556
|
}
|
|
568
557
|
} catch (e) {
|
|
569
558
|
context.warnings.push(
|
|
570
|
-
`[
|
|
559
|
+
`[W3039] Could not retrieve workflow run data for "${WORKFLOW_FILE_SHORT}": ${e.message}`,
|
|
571
560
|
);
|
|
572
561
|
}
|
|
573
562
|
|
package/package.json
CHANGED