From 0f0e7db3c3db38a660b9d0c22959549db5b1d006 Mon Sep 17 00:00:00 2001 From: Christina Martinez <31422523+christina-de-martinez@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:30:25 -0700 Subject: [PATCH] Update README.md --- README.md | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 566a3ea1..c1829174 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,21 @@ -# AI Code Reviewer +# Roast My Code -AI Code Reviewer is a GitHub Action that leverages OpenAI's GPT-4 API to provide intelligent feedback and suggestions on -your pull requests. This powerful tool helps improve code quality and saves developers time by automating the code -review process. +Roast My Code is a GitHub Action that uses OpenAI's GPT-4o mini model to rip your code to shreds. +Can't get enough of the mean, snarky comments you can get from Reddit or StackOverflow, or your favorite Senior Software Engineer? Have a bot do it instead. + +:warning: WARNING :warning: devs who are currently experiencing impostor syndrome should not attempt to use this action ## Features -- Reviews pull requests using OpenAI's GPT-4 API. -- Provides intelligent comments and suggestions for improving your code. -- Filters out files that match specified exclude patterns. -- Easy to set up and integrate into your GitHub workflow. +- Snarky +- Sarcastic +- Mean +- Vicious ## Setup 1. To use this GitHub Action, you need an OpenAI API key. If you don't have one, sign up for an API key - at [OpenAI](https://beta.openai.com/signup). + at [OpenAI](https://platform.openai.com/signup). 2. Add the OpenAI API key as a GitHub Secret in your repository with the name `OPENAI_API_KEY`. You can find more information about GitHub Secrets [here](https://docs.github.com/en/actions/reference/encrypted-secrets). @@ -22,7 +23,7 @@ review process. 3. Create a `.github/workflows/main.yml` file in your repository and add the following content: ```yaml -name: AI Code Reviewer +name: Roast My Code on: pull_request: @@ -37,12 +38,12 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - - name: AI Code Reviewer - uses: your-username/ai-code-reviewer@main + - name: Roast My Code + uses: your-username/roast-my-code@main with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # The GITHUB_TOKEN is there by default so you just need to keep it like it is and not necessarily need to add it as secret as it will throw an error. [More Details](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret) OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - OPENAI_API_MODEL: "gpt-4" # Optional: defaults to "gpt-4" + OPENAI_API_MODEL: "gpt-4o-mini" # Optional: defaults to "gpt-4" exclude: "**/*.json, **/*.md" # Optional: exclude patterns separated by commas ``` @@ -55,13 +56,14 @@ jobs: ## How It Works -The AI Code Reviewer GitHub Action retrieves the pull request diff, filters out excluded files, and sends code chunks to -the OpenAI API. It then generates review comments based on the AI's response and adds them to the pull request. +The Roast My Code GitHub Action retrieves the pull request diff, filters out excluded files, and sends code chunks to +the OpenAI API. It then generates review comments based on the AI's response and adds them to the pull request. + +This is a fork of [freeedcom/ai-codereviewer](https://github.com/freeedcom/ai-codereviewer) and I can't take any credit for how it works. My main contribution was some silly prompt engineering :) ## Contributing -Contributions are welcome! Please feel free to submit issues or pull requests to improve the AI Code Reviewer GitHub -Action. +Contributions are welcome! Please feel free to submit issues or pull requests. Let the maintainer generate the final package (`yarn build` & `yarn package`).