Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update the readme w/ screenshots #2

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 37 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,24 @@ languages.
- **AI-Powered Insights**: Employs ChatGPT for in-depth code analysis.
- **User-Friendly CLI**: Simple and intuitive command-line interface
for easy usage.
- **Markdown Reports**: Outputs code reviews in markdown for flexible viewing
and integration.

![Screenshot](./assets/cadre-screenshot.png)

## Review Details

Each diff file is reviewed in isolation. Code reviews are broken into several sections:

- Technical Accuracy
- Best Practices
- Performance and Scalability
- Readability and Clarity
- Maintainability
- Testability
- Contextual Fit

![Screenshot](./assets/cadre-best-practices-screenshot.png)

## Installation 🔧

Expand All @@ -31,39 +49,43 @@ Follow these steps:
go install github.com/kmesiab/cadre@latest
```

Set your OpenAI API Key:
Set your OpenAI API Key (You can also pass this value on the command
line w/ `--key`):
Comment on lines +52 to +53
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the instructions for setting the OpenAI API key have been updated to allow passing the value on the command line, it's important to remind users to keep their API keys secure and not to expose them in shell history or other insecure places.

+ # Reminder: Avoid exposing your API key in shell history or other insecure locations.

Committable suggestion

IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
Set your OpenAI API Key (You can also pass this value on the command
line w/ `--key`):
Set your OpenAI API Key (You can also pass this value on the command
line w/ `--key`):
# Reminder: Avoid exposing your API key in shell history or other insecure locations.


```bash
export OPENAI_API_KEY=sk-[SECRET]
```

Set your Ignore Files. These are file types that will be excluded from
code reviews. They should be a comma-separated list of file extensions.
For example:

```bash
export IGNORE_FILES=.mod,.sum
```

To run the program:

```bash
cadre
cadre --url [url to github pull request]
```

---

## Usage 💡

**Usage instructions for Cadre CLI go here. Provide examples and explain
how users can interact with it.**
To review a pull request, run the following command:

## Development and Testing 🧪
```bash
./cadre --url [url to github pull request]
```

### Building the Project 🏗️
or

```bash
make build
# Run the application with a GitHub pull request URL and API key
./cadre --url=https://github.com/user/repo/pull/123 --key=your_api_key
```

### Command-Line Switches

- `--url`: The GitHub pull request URL. Example: `--url=https://github.com/user/repo/pull/123`
- `--key`: Your OpenAI API key. You can also set this using the `OPENAI_API_KEY`
environment variable. Example: `--key=your_api_key`
- `--help`: Show help information.

### Running Tests ✔️

```bash
Expand Down
Binary file added assets/cadre-best-practices-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/cadre-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/cadre-self-review.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading