feat: add validation for the collapsed input parameter

Generated-by: Claude Sonnet 4.5
This commit is contained in:
Jozef Izso 2025-11-12 14:09:45 +01:00
parent 5fb0582760
commit c7935221e6
Failed to extract signature
2 changed files with 9 additions and 0 deletions

4
dist/index.js generated vendored
View file

@ -323,6 +323,10 @@ class TestReporter {
core.setFailed(`Input parameter 'list-tests' has invalid value`);
return;
}
if (this.collapsed !== 'auto' && this.collapsed !== 'always' && this.collapsed !== 'never') {
core.setFailed(`Input parameter 'collapsed' has invalid value`);
return;
}
if (isNaN(this.maxAnnotations) || this.maxAnnotations < 0 || this.maxAnnotations > 50) {
core.setFailed(`Input parameter 'max-annotations' has invalid value`);
return;

View file

@ -67,6 +67,11 @@ class TestReporter {
return
}
if (this.collapsed !== 'auto' && this.collapsed !== 'always' && this.collapsed !== 'never') {
core.setFailed(`Input parameter 'collapsed' has invalid value`)
return
}
if (isNaN(this.maxAnnotations) || this.maxAnnotations < 0 || this.maxAnnotations > 50) {
core.setFailed(`Input parameter 'max-annotations' has invalid value`)
return