Skip to content

CodeRabbit's TypeScript API client for connecting to Bitbucket Cloud and Bitbucket Data Center

License

Notifications You must be signed in to change notification settings

coderabbitai/bitbucket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

677da9e · Mar 4, 2025

History

65 Commits
Mar 3, 2025
Sep 17, 2024
Sep 30, 2024
Mar 4, 2025
Feb 27, 2025
Sep 17, 2024
Feb 27, 2025
Feb 27, 2025
Oct 9, 2024
Sep 17, 2024
Sep 18, 2024
Sep 17, 2024
Sep 17, 2024
Sep 17, 2024
Sep 17, 2024
Sep 18, 2024
Oct 1, 2024
Sep 17, 2024
Mar 4, 2025
Mar 2, 2025
Feb 27, 2025
Feb 27, 2025
Oct 1, 2024

Repository files navigation

@coderabbitai/bitbucket

Node.js CI Dependabot Updates GitHub Pages GitHub Downloads NPM Downloads

CodeRabbit's TypeScript API client for connecting to Bitbucket Cloud and Bitbucket Data Center.

This client is auto-generated by openapi-typescript using the OpenAPI schema from the documentation above.

Usage

pnpm i @coderabbitai/bitbucket

Cloud

import { createBitbucketCloudClient } from "@coderabbitai/bitbucket/cloud"
import { toBase64 } from "@coderabbitai/bitbucket"
import {
	BITBUCKET_CLOUD_APP_PASSWORD,
	BITBUCKET_CLOUD_URL,
	BITBUCKET_CLOUD_USERNAME,
} from "./env.js"

const basic = toBase64(
	BITBUCKET_CLOUD_USERNAME + ":" + BITBUCKET_CLOUD_APP_PASSWORD,
)

const client = createBitbucketCloudClient({
	baseUrl: BITBUCKET_CLOUD_URL.toString(),
	headers: { Accept: "application/json", Authorization: `Basic ${basic}` },
})

Server

import { createBitbucketServerClient } from "@coderabbitai/bitbucket/server"
import { BITBUCKET_SERVER_TOKEN, BITBUCKET_SERVER_URL } from "./env.js"

const server = createBitbucketServerClient({
	baseUrl: BITBUCKET_SERVER_URL,
	headers: {
		Accept: "application/json",
		Authorization: `Bearer ${BITBUCKET_SERVER_TOKEN}`,
	},
})