Release 1.2.7: Add Bitbucket API token support#212
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2f8834b1c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Returns: | ||
| str: 'api_token' or 'app_password' | ||
| """ | ||
| if 'BB_API_TOKEN' in os.environ: |
There was a problem hiding this comment.
Detect token mode only when BB_API_TOKEN has a value
get_auth_mode() switches to API-token auth whenever BB_API_TOKEN exists in the environment, even if it is an empty string (for example from BB_API_TOKEN= in a dotenv/template or an unset CI secret). In that case, runs that still provide valid BB_USER/BB_PASSWORD now fail with a ValueError in get_api_auth() instead of using legacy auth, which breaks the backward-compatibility this release promises.
Useful? React with 👍 / 👎.
Release 1.2.7
Adds support for Bitbucket API tokens while maintaining backward compatibility with app passwords.
Summary
App passwords are being deprecated by Atlassian and will stop working on June 9, 2026. This release adds support for API tokens, which are now the recommended authentication method.
Changes
Added:
BB_EMAILandBB_API_TOKENenvironment variablesauth_helpermodule for centralized authenticationUpdated:
bbhelper.py- Use auth helper for REST API callsripper_utils.py- Use auth helper for git operationsREADME.md- Comprehensive auth documentationdocenv.example- Show both auth methodsCHANGELOG.md- Release notesAuthentication Methods
API Token (Recommended):
App Password (Legacy - works until June 9, 2026):
Testing
Migration Guide
Users can migrate by:
BB_EMAIL+BB_API_TOKENenvironment variablesBB_USER+BB_PASSWORDNo code changes required - detection is automatic based on which environment variables are set.
Closes #211