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

Combine GitLab and GitHub interceptors #441

Closed
bigkevmcd opened this issue Feb 14, 2020 · 2 comments
Closed

Combine GitLab and GitHub interceptors #441

bigkevmcd opened this issue Feb 14, 2020 · 2 comments

Comments

@bigkevmcd
Copy link
Member

Expected Behavior

Instead of GitHub and GitLab interceptors being separate

      interceptors:
        - github:
            secretRef:
              secretName: foo
              secretKey: bar
            eventTypes:
              - pull_request

Perhaps these could be simplified to a GitWebhook with type github or gitlab

This would make extending somewhat simpler:

And tidy this long validation line up:

https://github.com/tektoncd/triggers/blob/master/pkg/apis/triggers/v1alpha1/event_listener_validation.go#L83

And make it easier to extend with Bitbucket, and other possible interceptors, while keeping the benefits of the strongly typed values, as opposed to...

      interceptors:
        - type: github
          params:
             name: secretName
             value: foo
             name: secretKey
             value: bar
             name: eventTypes
             value:
               - pull_request
@wlynch
Copy link
Member

wlynch commented Feb 21, 2020

I would prefer to keep these separate, just so that they can be updated and configured separately.

Even within pipelines there is a strong argument against the common pull request resource, since it limits interactions with the underlying SCMs to the lowest common denominator interface. There's been some experimentation within the catalog to break things up into individual tasks: https://github.com/tektoncd/catalog/tree/master/github.

I suspect this will be highly coupled to #271. w.r.t. validation I imagine a scenario where plugins register and handle self validation, and the EL just verifies that there is a valid mapping.

@bigkevmcd
Copy link
Member Author

Plugin registration sounds like the way to go, sounds good to me

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