feat: Add Bitbucket integration#3039
Conversation
| return "" | ||
| } | ||
|
|
||
| func (b *Bitbucket) Configuration() []configuration.Field { |
There was a problem hiding this comment.
I think we need to support workspace access tokens here too. Maybe we can have an authType configuration field with two options: API token / Workspace access token.
Check the PagerDuty integration. We do something similar there.
|
|
||
| ctx.Integration.SetMetadata(Metadata{ | ||
| Workspace: config.Workspace, | ||
| Repositories: repos, |
There was a problem hiding this comment.
Not sure about keeping the repositories in the metadata here. For GitHub, we do that because that's the only way to know which repositories are actually authorized for the GitHub App, and we get events about new repositories being authorized. Here, since we are using an API token or access token, we can just list the repositories when we need to, which should just be when creating the node in the UI. Otherwise, we'd need to refresh the repositories in the metadata.
There was a problem hiding this comment.
To verify that the API token / access token passed is OK, we can just describe the workspace. That would also us to store more information about the workspace in the metadata, like ID, URL, ...
There was a problem hiding this comment.
The idea was to store the repositories in metadata to avoid calling the API every time a node is created. But you're right, that would mean we wouldn’t get newly added repos unless we refresh. I’ll update it accordingly.
| } | ||
|
|
||
| func (b *Bitbucket) Instructions() string { | ||
| return "" |
There was a problem hiding this comment.
We need some instructions here about where / how to create the API token / workspace access token.
Implements #1956.
This PR adds the Bitbucket integration with an On Push trigger.
It supports workspace authentication via email + API token, lists repositories, and provisions webhooks for push events.
The trigger supports ref filtering via predicates and emits Bitbucket push payloads to workflows.
Demo:
2026-02-11.17-17-28.mp4