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

Support for Bitbucket hooks #10

Open
nicklayb opened this issue Mar 14, 2019 · 3 comments
Open

Support for Bitbucket hooks #10

nicklayb opened this issue Mar 14, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@nicklayb
Copy link

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?

@gcauchon
Copy link
Contributor

I think your plan covers the webhook and fetching repository metadata, which is 2/3 of the cycle. Have you look at the code that actually assign reviewers and post the comment in the PR stream?

@nicklayb
Copy link
Author

I may have mistakenly skipped that part, I was sure it was part of the GitHubClient module actually.

Can you point me out this part of the code?

@remi remi added the enhancement New feature or request label Mar 20, 2019
@GabDesilets
Copy link

@nicklayb correct me if i'm wrong, which i think you'll haha but it would only need a bitbucket_client matching what the client_behavior need .

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

No branches or pull requests

4 participants