Skip to content

Repository files navigation

@coderabbitai/bitbucket

Node.js CIDependabot UpdatesGitHub PagesGitHub DownloadsNPM DownloadsCodeRabbit Pull Request Reviews

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 add @coderabbitai/bitbucket

Cloud

You can use the native openapi-fetch client or the BitbucketCloudClient class.

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"constbasic=toBase64(BITBUCKET_CLOUD_USERNAME+":"+BITBUCKET_CLOUD_APP_PASSWORD,)constclient=createBitbucketCloudClient({baseUrl: BITBUCKET_CLOUD_URL.toString(),headers: {Accept: "application/json",Authorization: `Basic ${basic}`},})

The BitbucketCloudClient wraps openapi-fetch requests by using the schema's operationId as method names.

import{BitbucketCloudClient}from"@coderabbitai/bitbucket/cloud"import{toBase64}from"@coderabbitai/bitbucket"import{BITBUCKET_CLOUD_APP_PASSWORD,BITBUCKET_CLOUD_URL,BITBUCKET_CLOUD_USERNAME,}from"./env.js"constbasic=toBase64(BITBUCKET_CLOUD_USERNAME+":"+BITBUCKET_CLOUD_APP_PASSWORD,)constclient=newBitbucketCloudClient({baseUrl: BITBUCKET_CLOUD_URL.toString(),headers: {Accept: "application/json",Authorization: `Basic ${basic}`},})

Server

You can use the native openapi-fetch client or the BitbucketServerClient class.

import{createBitbucketServerClient}from"@coderabbitai/bitbucket/server"import{BITBUCKET_SERVER_TOKEN,BITBUCKET_SERVER_URL}from"./env.js"constclient=createBitbucketServerClient({baseUrl: BITBUCKET_SERVER_URL,headers: {Accept: "application/json",Authorization: `Bearer ${BITBUCKET_SERVER_TOKEN}`,},})

The BitbucketServerClient wraps openapi-fetch requests by using the schema's operationId as method names.

import{BitbucketServerClient}from"@coderabbitai/bitbucket/server"import{BITBUCKET_SERVER_TOKEN,BITBUCKET_SERVER_URL}from"./env.js"constclient=newBitbucketServerClient({baseUrl: BITBUCKET_SERVER_URL,headers: {Accept: "application/json",Authorization: `Bearer ${BITBUCKET_SERVER_TOKEN}`,},})

About

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

Topics

Resources

Code of conduct

Contributing

Stars

14 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages

Generated from NatoBoram/gigachad.ts