Skip to content

feat: Add Bitbucket integration#3039

Draft
ishaksebsib wants to merge 5 commits intosuperplanehq:mainfrom
ishaksebsib:feat/bitbucket
Draft

feat: Add Bitbucket integration#3039
ishaksebsib wants to merge 5 commits intosuperplanehq:mainfrom
ishaksebsib:feat/bitbucket

Conversation

@ishaksebsib
Copy link

@ishaksebsib ishaksebsib commented Feb 11, 2026

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

@AleksandarCole AleksandarCole added pr:stage-1/3 Needs to pass basic review. wfh labels Feb 11, 2026
@AleksandarCole AleksandarCole added pr:stage-2/3 Needs to pass functional review and removed pr:stage-1/3 Needs to pass basic review. labels Feb 12, 2026
return ""
}

func (b *Bitbucket) Configuration() []configuration.Field {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll look into it


ctx.Integration.SetMetadata(Metadata{
Workspace: config.Workspace,
Repositories: repos,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, ...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need some instructions here about where / how to create the API token / workspace access token.

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

Labels

pr:stage-2/3 Needs to pass functional review wfh

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants