@taranti/recenzo
v1.2.0
Published
Recenzo is a JS/TS library for custom AI powered Bitbucket code reviews. Fetch PR diffs, analyze changes, and automate reviewer feedback to enforce standards.
Downloads
9
Maintainers
Readme
Recenzo
Recenzo is a JS/TS library for custom AI powered Bitbucket code reviews. Fetch PR diffs, analyze changes, and automate reviewer feedback to enforce standards.
Table of Contents
Installation
Use your favorite package manager to install recenzo.
npm:
npm install @taranti/recenzoyarn:
yarn add @taranti/recenzoUsage
Environment Variables
Before using Recenzo, you need to set up the following environment variables:
BITBUCKET_ACCESS_TOKEN: Required for Bitbucket API accessOPENAI_API_KEY: Required for AI-powered code reviews
You can set these in your environment or use a .env file.
Node
import recenzo from '@taranti/recenzo';
// Pull request information
const pullRequestInfo = {
workspace: 'your-workspace',
repository: 'your-repository',
prNumber: 123,
ignoredFiles: ['package-lock.json'], // optional
};
// Code review instructions
const codeReviewInstruction = {
commentLanguage: 'en', // Language for comments (e.g., 'en', 'fr', etc.)
instruction: 'Please review this code for best practices and potential bugs.',
};
// Options (optional)
const options = {
dryRun: false, // Set to true to preview without posting comments
};
// Review the pull request
// The options parameter is optional and can be omitted
await recenzo.reviewPullRequest(pullRequestInfo, codeReviewInstruction, options);
// Or without options
await recenzo.reviewPullRequest(pullRequestInfo, codeReviewInstruction);Contributing
We welcome contributions to Recenzo! Please see our Contributing Guidelines for details on:
- Project architecture and organization
- Build and configuration instructions
- Testing guidelines and requirements
- Development workflow
- How to submit pull requests
For major changes, please open an issue first to discuss what you would like to change.
