ランキングに戻る

anc95/ChatGPT-CodeReview

JavaScriptgithub.com/apps/cr-gpt

🐥 A code review bot powered by ChatGPT

chatgptcodereviewprobot
スター成長
スター
4.5k
フォーク
458
週間成長
Issue
51
2k4k
2023年2月2024年3月2025年5月2026年7月
成果物npmnpm install chatgpt-codereview
README

CodeReview BOT

A code review robot powered by ChatGPT

Translation Versions: ENGLISH | 简体中文 | 繁體中文 | 한국어 | 日本語

Bot Usage

❗️⚠️ Due to cost considerations, BOT is only used for testing purposes and is currently deployed on AWS Lambda with ratelimit restrictions. Therefore, unstable situations are completely normal. It is recommended to deploy an app by yourself.

Install

Install: apps/cr-gpt;

Configuration

  1. Go to the repo homepage which you want integrate this bot
  2. click settings
  3. click actions under secrets and variables
  4. Change to Variables tab, create a new variable OPENAI_API_KEY with the value of your open api key (For Github Action integration, set it in secrets)image

Start using

  1. The robot will automatically do the code review when you create a new Pull request, the review information will show in the pr timeline / file changes part.
  2. After git push update the pull request, cr bot will re-review the changed files

example:

ChatGPT-CodeReview/pull/21

image

Using Github Actions

actions/chatgpt-codereviewer

  1. add the OPENAI_API_KEY to your github actions secrets
  2. create .github/workflows/cr.yml add bellow content
name: Code Review

permissions:
  contents: read
  pull-requests: write
  models: true # if you choose use github models, set this to be true

on:
  pull_request:
    types: [opened, reopened, synchronize]

jobs:
  test:
    # if: ${{ contains(github.event.*.labels.*.name, 'gpt review') }} # Optional; to run only when a label is attached
    runs-on: ubuntu-latest
    steps:
      - uses: anc95/ChatGPT-CodeReview@main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

          # if use github models https://github.com/marketplace/models
          USE_GITHUB_MODELS: true
          MODEL: openai/gpt-4o

          # else if use azure deployment
          AZURE_API_VERSION: xx
          AZURE_DEPLOYMENT: xx

          # else use standard llm model
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
          OPENAI_API_ENDPOINT: https://api.openai.com/v1
          MODEL: gpt-3.5-turbo # https://platform.openai.com/docs/models

          # common
          LANGUAGE: Chinese
          PROMPT: # example: Please check if there are any confusions or irregularities in the following code diff:
          top_p: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-top_p
          temperature: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature
          max_tokens: 10000
          # REASONING_EFFORT: low # optional; only for reasoning models (e.g. gpt-5.4, gpt-5.5), values (model support varies): none, minimal, low, medium, high, xhigh
          MAX_PATCH_LENGTH: 10000 # if the patch/diff length is large than MAX_PATCH_LENGTH, will be ignored and won't review. By default, with no MAX_PATCH_LENGTH set, there is also no limit for the patch/diff length.
          IGNORE_PATTERNS: /node_modules/**/*,*.md # glob pattern or regex pattern to ignore files, separated by comma
          INCLUDE_PATTERNS: *.js,*.ts # glob pattern or regex pattern to include files, separated by comma

Self-hosting

  1. clone code
  2. copy .env.example to .env, and fill the env variables
  3. install deps and run
npm i
npm i -g pm2
npm run build
pm2 start pm2.config.cjs

probot for more detail

Dev

Setup

# Install dependencies
npm install

# Build code
npm run build

# Run the bot
npm run start

Docker

# 1. Build container
docker build -t cr-bot .

# 2. Start container
docker run -e APP_ID=<app-id> -e PRIVATE_KEY=<pem-value> cr-bot

Contributing

If you have suggestions for how cr-bot could be improved, or want to report a bug, open an issue! We'd love all and any contributions.

For more, check out the Contributing Guide.

Credit

this project is inpired by codereview.gpt

License

ISC © 2023 anc95

関連リポジトリ
NousResearch/hermes-agent

The agent that grows with you

PythonPyPIMIT Licenseaiai-agent
hermes-agent.nousresearch.com
218.5k41.3k
f/prompts.chat

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

HTMLOtherchatgptai
prompts.chat
166.2k21.5k
langflow-ai/langflow

Langflow is a powerful tool for building and deploying AI-powered agents and workflows.

PythonPyPIMIT Licensereact-flowchatgpt
langflow.org
152.2k9.6k
langchain-ai/langchain

The agent engineering platform.

PythonPyPIMIT Licenseaianthropic
docs.langchain.com/langchain/
142.3k23.7k
f/awesome-chatgpt-prompts

This repo includes ChatGPT prompt curation to use ChatGPT and other LLM tools better.

HTMLCreative Commons Zero v1.0 Universalchatbotchatgpt
prompts.chat
121.3k16.3k
microsoft/generative-ai-for-beginners

21 Lessons, Get Started Building with Generative AI

Jupyter NotebookMIT Licenseaichatgpt
113.3k60.8k
ChatGPTNextWeb/NextChat

✨ Light and Fast AI Assistant. Support: Web | iOS | MacOS | Android | Linux | Windows

TypeScriptnpmMIT Licensechatgptnextjs
nextchat.club
88.5k59.4k
OpenHands/OpenHands

🙌 OpenHands: AI-Driven Development

PythonPyPIOtheragentartificial-intelligence
openhands.dev
81.6k10.4k
lobehub/lobehub

🤯 LobeHub is your Chief Agent Operator, organizing your agents into 7×24 operations by hiring, scheduling, and reporting on your entire AI team.

TypeScriptnpmOtherchatgptopenai
lobehub.com
80.6k15.7k
ChatGPTNextWeb/ChatGPT-Next-Web

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini/Claude LLM 应用。

TypeScriptnpmchatgptnextjs
nextchat.dev/chat
78.5k60k
dair-ai/Prompt-Engineering-Guide

🐙 Guides, papers, lessons, notebooks and resources for prompt engineering, context engineering, RAG, and AI Agents.

MDXMIT Licensedeep-learningprompt-engineering
promptingguide.ai
76.8k8.4k
openai/openai-cookbook

Examples and guides for using the OpenAI API

Jupyter NotebookMIT Licenseopenaichatgpt
cookbook.openai.com
74.8k12.7k