Skip to content

Support for Bitbucket hooks #10

Description

@nicklayb

As we talked, I would like to implement Bitbucket support in Dispatch and pave the ground for other support such as GitLab. I browsed the code a bit and here is how I'm planning to implement it:

  • Add a configuration called provider where you can set either github or bitbucket (defaults to github for backward compatibility)
  • Move the Github webhook handling in Webhooks.Controller to his own Webhooks.GitHub module
  • Rename the :create action in Webhooks.Controller for :github which will call the Webhooks.GitHub module (and point the route to :github)
  • Create Webhooks.Bitbucket module for handling Bitbucket webhook
  • Add a POST :bitbucket action in Webhooks.Controller which uses the Webhooks.Bitbucket module with a route /webhooks/bitbucket
  • Add a BitbucketClient that implements ClientBehaviour.
  • Make sure that the Client module is used dependant on provider config variable.

Anything I forgot? Any recommandation?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions