feat(enterprise): Bitbucket Data Center Integration#13228
Merged
Conversation
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
16b4382 to
1bab530
Compare
Collaborator
all-hands-bot
left a comment
There was a problem hiding this comment.
Taste Rating: 🟡 Acceptable
This is solid, pragmatic engineering. You're pattern-matching the existing GitHub/GitLab integrations, solving a real problem (Bitbucket DC's lack of OIDC support), and the solution is appropriately simple. Test coverage is comprehensive.
A couple of minor improvements to consider, but nothing blocking.
- Remove module-level BITBUCKET_DATA_CENTER_HOST import - Read from os.environ.get() inside userinfo method - Add ValueError if BITBUCKET_DATA_CENTER_HOST is not set - Use local bitbucket_base_url variable instead of module constant Co-authored-by: openhands <openhands@all-hands.dev>
…inside route method Moved from reading os.environ directly to importing the constant from server.auth.constants. The validation check remains inside the route method rather than at module level. Co-authored-by: openhands <openhands@all-hands.dev>
Extract the timeout value of 10 seconds to a module-level constant BITBUCKET_DC_TIMEOUT for improved clarity and maintainability.
aivong-openhands
approved these changes
Mar 5, 2026
amanape
pushed a commit
that referenced
this pull request
Mar 6, 2026
Co-authored-by: openhands <openhands@all-hands.dev>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of PR
This PR adds an enterprise integration for Bitbucket Data Center so that users can authenticate to OpenHands with OAuth2.
This PR largely pattern matches the existing enterprise authentication integrations, except that Bitbucket Data Center doesn't support OIDC directly. Data Center lacks the standard
userinfoendpoint, so this PR introduces a proxy endpoint that compiles user info from Data Center'swhoamiandusersendpoints. The keycloack realm config points at the proxy for theuserInfoUrl.Demo Screenshots/Videos
Video demonstrates logging in with Bitbucket Data Center, starting a conversation, and opening a PR.
Screen.Recording.2026-03-04.at.8.52.05.PM.mov
Change Type
Checklist
Fixes
Resolves #(issue)
Release Notes
Added enterprise integration for Bitbucket Data Center.
To run this PR locally, use the following command:
GUI with Docker: