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

Bitbucket Server: Webhooks #122

Open
11 tasks
mickmister opened this issue Oct 11, 2023 · 0 comments
Open
11 tasks

Bitbucket Server: Webhooks #122

mickmister opened this issue Oct 11, 2023 · 0 comments

Comments

@mickmister
Copy link
Contributor

When the plugin receives a webhook event from Bitbucket, we parse the HTTP body into data structures defined by the plugin. We’ll need to be able to differentiate between the two different webhook event structures from the two Bitbucket systems.

https://github.com/mattermost/mattermost-plugin-bitbucket/blob/84a4030b48eb91683d9038ba35afacc9ec9e8f92/server/webhookpayload/bitbucket.go#L83
The Webhook.Parse method does most of the logic of parsing the incoming webhook request. Having this method be the defining factor as the WebhookUnmarshaler interface makes sense.

The following webhook event types are currently supported by the plugin:

https://github.com/mattermost/mattermost-plugin-bitbucket/blob/84a4030b48eb91683d9038ba35afacc9ec9e8f92/server/webhook.go#L35

  • RepoPushEvent
  • IssueCreatedEvent
  • IssueUpdatedEvent
  • IssueCommentCreatedEvent
  • PullRequestCreatedEvent
  • PullRequestUpdatedEvent
  • PullRequestApprovedEvent
  • PullRequestUnapprovedEvent
  • PullRequestDeclinedEvent
  • PullRequestMergedEvent
  • PullRequestCommentCreatedEvent

They are implemented in the link below. Only the ones in the above list need to be implemented. The rest can be removed from the code linked below.
https://github.com/mattermost/mattermost-plugin-bitbucket/blob/84a4030b48eb91683d9038ba35afacc9ec9e8f92/server/webhookpayload/bitbucket.go#L129

Ticket Link

Epic ticket #6

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

1 participant