Validate inputs when none are defined
This commit is contained in:
@@ -32,7 +32,7 @@ export function convertWorkflowJobInputs(context: TemplateContext, job: Reusable
|
|||||||
|
|
||||||
if (inputValues !== undefined) {
|
if (inputValues !== undefined) {
|
||||||
for (const [_, [name, value]] of inputValues) {
|
for (const [_, [name, value]] of inputValues) {
|
||||||
if (inputDefinitions !== undefined && !inputDefinitions.has(name.toLowerCase())) {
|
if (inputDefinitions === undefined || !inputDefinitions.has(name.toLowerCase())) {
|
||||||
context.error(value, `Invalid input, ${name} is not defined in the referenced workflow.`);
|
context.error(value, `Invalid input, ${name} is not defined in the referenced workflow.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
-1
@@ -1,7 +1,6 @@
|
|||||||
include-source: false # Drop file/line/col from output
|
include-source: false # Drop file/line/col from output
|
||||||
skip:
|
skip:
|
||||||
- Go
|
- Go
|
||||||
- TypeScript
|
|
||||||
---
|
---
|
||||||
on: push
|
on: push
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
Reference in New Issue
Block a user