This repository is included in our open-source Pro Support service which offers an efficient solution for managing popular GitHub Actions dependencies with ease:
🙌 forked from anc95/ChatGPT-CodeReview
What is Open-Source Pro Support?
Open-Source Pro Support is a comprehensive service designed to streamline your workflow by providing:
-
Customized Forks: We create public forks of popular GitHub Actions, ensuring you have access to the latest features and fixes.
-
Dedicated Technical Support: Say goodbye to the hassle of managing multiple open-source dependencies. With our service, you have a single point of contact for all your support needs. Reach out to us on our Discord server, and our team of experts will be ready to assist you.
-
Priority Fixes: Experience seamless issue resolution with our priority fix service. If you encounter any issues with our forks, we prioritize fixing them promptly to minimize disruptions to your workflow.
-
Community Contribution: We believe in giving back to the open-source community. When we fix issues in our forks, we handle creating pull requests to the original authors, ensuring that the entire community benefits from the improvements.
How It Works
-
Choose Our Fork: Instead of referencing popular GitHub Actions repositories directly, simply reference this repository in your workflow.
-
Enjoy Dedicated Support: If you encounter any issues or need assistance, reach out to us on our Discord server. Our team will be happy to help you promptly.
-
Benefit from Priority Fixes: Experience seamless issue resolution with our priority fix service. We prioritize fixing issues in our forks to ensure smooth operation for your projects.
-
Contribute to the Community: Rest assured that when we fix issues in our forks, we contribute back to the original repositories, benefiting the entire open-source community.
Not Your Thing?
We don't want to get in between you and the community. If you want to handle forking and submitting a pull request yourself, that's awesome.
However, feel free to reach out to us on Discord anyway if you need any help and advice in doing so.
❤️ open-source
- add the
OPENAI_API_KEY
to your github actions secrets - create
.github/workflows/cr.yml
add bellow content
name: Code Review
permissions:
contents: read
pull-requests: write
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: repo-racers/gpt-codereview-action@v0.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
# Optional
LANGUAGE: Chinese
OPENAI_API_ENDPOINT: https://api.openai.com/v1
MODEL: gpt-3.5-turbo # https://platform.openai.com/docs/models
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
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.
- clone code
- copy
.env.example
to.env
, and fill the env variables - install deps and run
npm i
npm i -g pm2
npm run build
pm2 start pm2.config.cjs
probot for more detail
# Install dependencies
npm install
# Build code
npm run build
# Run the bot
npm run start
# 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
Tip
For support with this repo and many other open-source projects, visit us at https://reporacers.com/ and join us on Discord.