Bitbucket

Manage Bitbucket repositories, pull requests, and pipelines via API.

thinkfleetai 1041005 812 B Updated

File contents

Bitbucket

Git repository hosting.

Environment

export BITBUCKET_USERNAME="xxxxxxxxxx"
export BITBUCKET_APP_PASSWORD="xxxxxxxxxx"

List Repositories

curl -u "$BITBUCKET_USERNAME:$BITBUCKET_APP_PASSWORD" "https://api.bitbucket.org/2.0/repositories/$BITBUCKET_USERNAME"

Create Pull Request

curl -X POST -u "$BITBUCKET_USERNAME:$BITBUCKET_APP_PASSWORD" \
  "https://api.bitbucket.org/2.0/repositories/{workspace}/{repo}/pullrequests" \
  -H "Content-Type: application/json" \
  -d '{"title": "Feature PR", "source": {"branch": {"name": "feature"}}, "destination": {"branch": {"name": "main"}}}'

Links

thinkfleetai/thinkfleet-engine/tree/main/skills/bitbucket commit 104100575a

Frequently asked questions

npx skillmds@latest add thinkfleetai/bitbucket