Skip to content

amalhanaja/codebleu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codebleu: Powerful Pull Request/Merge Request Reviewer

Streamline your code review workflow with Codebleu, a powerful tool that assists you in reviewing pull request (PR) or merge request (MR) changes. Leveraging Gemini AI, Codebleu provides valuable insights and potential issues to consider, empowering you to conduct more efficient and effective code reviews.

NAME:
   Codebleu - Review PR / MR Diff Changes

USAGE:
   Codebleu [global options] command [command options] 

VERSION:
   v0.0.1

DESCRIPTION:
   Pull Request / Merge Request reviewer agent

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --model value, -m value       uses model to review pull request (options: "gemini-1.5-flash" (default), "gemini-1.5-pro", "gemini-1.0-pro") (default: "gemini-1.5-flash") [$MODEL]
   --repository value, -r value  hosted remote repository provider name (options: "bitbucket", "github") [$REPOSITORY_PROVIDER]
   --id value                    pull request id [$PULL_REQUEST_ID]
   --system-instruction value    Custom system instruction for review pull request diff chages [$SYSTEM_INSTRUCTION]
   --help, -h                    show help
   --version, -v                 print the version

Example

Usage

Github

Configure Environment Variable

export GH_ACCESS_TOKEN=<YOUR_GITHUB_ACCESS_TOKEN>
export GH_OWNER=<YOUR_GITHUB_REPOSITORY_OWNER>
export GH_REPO_SLUG=<YOUR_REPOSITORY_SLG>
export GEMINI_API_KEY=<YOUR_GEMINI_API_KEY>

Command

codebleu --repository github --id <PULL_REQUEST_ID>

Example:

Pull Request Url to review : #1

Environment Variable

export GH_ACCESS_TOKEN="secret_access_token"
export GH_OWNER="amalhanaja"
export GH_REPO_SLUG="codebleu"
export GEMINI_API_KEY="secret_api_key"

Command

codebleu --repository github --id 1

Bitbucket

Configure Environment Variable

export BITBUCKET_ACCESS_TOKEN=<YOUR_BITBUCKET_ACCESS_TOKEN>
export BITBUCKET_REPO_SLUG=<YOUR_REPOSITORY_SLUG>
export BITBUCKET_WORKSPACE=<YOUR_REPOSITORY_WORKSPACE>
export GEMINI_API_KEY=<YOUR_GEMINI_API_KEY>

Command

codebleu --repository github --id <PULL_REQUEST_ID>

Example:

Pull Request Url to review : https://bitbucket.org/amalhanaja/test/pull-requests/8

Environment Variable

export BITBUCKET_ACCESS_TOKEN="secret_access_token"
export BITBUCKET_WORKSPACE="amalhanaja"
export BITBUCKET_REPO_SLUG="test"
export GEMINI_API_KEY="secret_api_key"

Command

codebleu --repository bitbucket --id 8