You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 theWebhookUnmarshaler
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
The text was updated successfully, but these errors were encountered: