tekton-lint
tekton-lint copied to clipboard
Bindings need to be an array not object
Describe the bug
I received a 500 from the backend with this syntax:
spec:
triggers:
- bindings:
name: github-pr-binding
template:
name: pr-template
with pipelineId: c2cd6a8d-ea5a-47b0-913e-cd172d63833f, transactionId: d0a52994-03da-4841-9a45-8e6d375fbb19, error: (trigger.bindings || (trigger.binding && [trigger.binding]) || []).forEach is not a function at TypeError: (trigger.bindings || (trigger.binding && [trigger.binding]) || []).forEach is not a function
at Object.getTemplatedResources (/home/node/lib/pipelineutil.js:708:76)
To Reproduce
spec:
triggers:
- bindings:
name: github-pr-binding
template:
name: pr-template
Expected behavior
I expected a linting error. I expected a proper error handling in the backend.
The fix
spec:
triggers:
- bindings:
- name: github-pr-binding
template:
name: pr-template
Thank you :)
thanks for the report!