Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bindings need to be an array not object #105

Open
kirrg001 opened this issue Feb 13, 2024 · 1 comment
Open

Bindings need to be an array not object #105

kirrg001 opened this issue Feb 13, 2024 · 1 comment

Comments

@kirrg001
Copy link

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 :)

@mbwhite
Copy link
Collaborator

mbwhite commented Feb 13, 2024

thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants