Skip to main content

Module bitbucket

Module bitbucket 

Source
Expand description

Bitbucket backend — Bitbucket Cloud only at v0.1.

§Why Bitbucket is different

Bitbucket Cloud has no first-class “releases” concept. Tool authors distribute binaries via two parallel features:

  • Git tags — fetched from /2.0/repositories/{workspace}/{repo_slug}/refs/tags. These carry a target.date for ordering.
  • Repository Downloads — a repo-level list of uploaded files at /2.0/repositories/{workspace}/{repo_slug}/downloads.

This backend synthesises releases by pairing the two: a release for tag T is the tag itself plus every Download whose filename contains the tag string (case-insensitive substring match). ReleaseProvider::list_releases returns ProviderError::Unsupported because synthesising a listing would be guessy and slow; callers should prefer ReleaseProvider::latest_release (picks the newest tag by date) or ReleaseProvider::release_by_tag (matches the tag name verbatim).

§Authentication

Bitbucket Cloud accepts App Passwords via HTTP Basic auth: Authorization: Basic base64(username:app_password). We carry the username on BitbucketParams::username and receive the app password as the SecretString token.

§Not shipped at v0.1

  • Bitbucket Data Center / Server. Its URL shape (<host>/rest/api/1.0) and response JSON both differ from Cloud. Revisit in a follow-up when a real user need surfaces.
  • OAuth 2.0 consumer flow. Out of scope for a read-only release provider; app passwords are fine.

§Lint exception

Same as the other REST backends.

Structs§

BitbucketProvider
Bitbucket Cloud release provider.

Functions§

factory
Construct a BitbucketProvider.