Skip to content

bitbucket: require BITBUCKET_WORKSPACES, prefer BITBUCKET_EMAIL#228

Merged
amitsaha merged 1 commit into
amitsaha:masterfrom
steveh:feat/bitbucket-workspace
Jun 1, 2026
Merged

bitbucket: require BITBUCKET_WORKSPACES, prefer BITBUCKET_EMAIL#228
amitsaha merged 1 commit into
amitsaha:masterfrom
steveh:feat/bitbucket-workspace

Conversation

@steveh
Copy link
Copy Markdown
Contributor

@steveh steveh commented May 29, 2026

Atlassian removed the cross-workspace listing endpoints (/2.0/workspaces and /2.0/user/permissions/workspaces) on April 14, 2026 under CHANGE-2770 / CHANGE-3022. The Bitbucket backup path has been failing with HTTP 410 Gone since then, because getBitbucketRepositories() called client.Workspaces.List() to discover which workspaces to iterate.

There is no supported replacement that enumerates a user's workspaces; the caller must now know each workspace slug out-of-band. Require the user to provide them via a new BITBUCKET_WORKSPACES env var (comma-separated). Repository listing per workspace still works via the unchanged /2.0/repositories/{workspace} endpoint, so the rest of the flow is unaffected.

Also rename the credential username variable to make it clearer that for Atlassian API tokens this must be the account email, not the legacy Bitbucket username. Accept BITBUCKET_EMAIL in preference to BITBUCKET_USERNAME; keep BITBUCKET_USERNAME as a fallback so existing setups using app passwords (still supported until July 28, 2026) keep working.

Fixes #223

Atlassian removed the cross-workspace listing endpoints (/2.0/workspaces and /2.0/user/permissions/workspaces) on April 14, 2026 under CHANGE-2770 / CHANGE-3022.
The Bitbucket backup path has been failing with HTTP 410 Gone since then, because getBitbucketRepositories() called client.Workspaces.List() to discover which workspaces to iterate.

There is no supported replacement that enumerates a user's workspaces; the caller must now know each workspace slug out-of-band. Require the user to provide them via a new BITBUCKET_WORKSPACES env var (comma-separated). Repository listing per workspace still works via the unchanged /2.0/repositories/{workspace} endpoint, so the rest of the flow is unaffected.

Also rename the credential username variable to make it clearer that for Atlassian API tokens this must be the account email, not the legacy Bitbucket username. Accept BITBUCKET_EMAIL in preference to BITBUCKET_USERNAME; keep BITBUCKET_USERNAME as a fallback so existing setups using app passwords (still supported until July 28, 2026) keep working.

Fixes amitsaha#223
@steveh steveh force-pushed the feat/bitbucket-workspace branch from 6510f5a to be22089 Compare May 29, 2026 09:21
@amitsaha
Copy link
Copy Markdown
Owner

amitsaha commented Jun 1, 2026

Thank you @steveh 🙏

@amitsaha amitsaha merged commit 01f5312 into amitsaha:master Jun 1, 2026
6 checks passed
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

Successfully merging this pull request may close these issues.

Bitbucket not working - Bitbucket 410 gone

2 participants