Skip to content

Comments

feat: add Bitbucket Cloud support#402

Open
devtedlee wants to merge 1 commit intovercel-labs:mainfrom
devtedlee:feat/add-bitbucket-support
Open

feat: add Bitbucket Cloud support#402
devtedlee wants to merge 1 commit intovercel-labs:mainfrom
devtedlee:feat/add-bitbucket-support

Conversation

@devtedlee
Copy link

Summary

  • Add full Bitbucket Cloud (bitbucket.org) support with feature parity to GitHub/GitLab
  • Users can now skills add, skills check, and skills update for Bitbucket-hosted skills
  • Supports private repos via BITBUCKET_TOKEN or BITBUCKET_USERNAME + BITBUCKET_APP_PASSWORD environment variables

Changes

File Description
src/types.ts Add 'bitbucket' to ParsedSource type union
src/source-parser.ts Add 3 Bitbucket URL regex patterns, exclude from isDirectSkillUrl / isWellKnownUrl
src/skill-lock.ts Add getBitbucketAuthHeaders() and fetchBitbucketSkillFolderHash()
src/cli.ts Update runCheck() / runUpdate() to support Bitbucket, add help text example
src/add.ts Add Bitbucket branches to hash fetching in 2 locations
README.md Add Bitbucket URL example to Source Formats
tests/source-parser.test.ts Add 7 Bitbucket URL parsing + getOwnerRepo tests

Design Decisions

  • Hash detection: Bitbucket lacks GitHub-style tree SHAs, so the latest commit hash affecting the skill folder path is used as a change-detection mechanism via GET /2.0/repositories/{workspace}/{repo}/commits?include={branch}&path={path}&pagelen=1
  • URL pattern: Bitbucket uses /src/branch/path (vs GitHub /tree/ and GitLab /-/tree/)
  • Auth: Supports Bearer token (BITBUCKET_TOKEN) and Basic auth (BITBUCKET_USERNAME + BITBUCKET_APP_PASSWORD); unauthenticated access works for public repos

Test Plan

  • All existing unit tests pass (64/64)
  • New Bitbucket URL parsing tests pass (5 parseSource + 2 getOwnerRepo)
  • E2E: skills add from private Bitbucket repo — clones and installs skill
  • E2E: skills check — detects no updates when up to date
  • E2E: Push change to Bitbucket → skills check detects update
  • E2E: skills update — applies update, verified file content reflects changes
  • E2E: skills check after update — confirms "All skills are up to date"

Closes #277

Add full Bitbucket Cloud (bitbucket.org) support with feature parity
to GitHub/GitLab, enabling users to install, check, and update skills
hosted on Bitbucket repositories.

Closes vercel-labs#277
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.

[Feature]: Add Bitbucket support

1 participant