-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
65 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,66 @@ | ||
## rebotai | ||
A GitHub bot powered by OpenAI for code review on pull requests. | ||
# Rebotai | ||
Rebotai is a GitHub bot powered by OpenAI that performs code reviews on pull requests. | ||
|
||
## usage | ||
.....WIP | ||
## Usage | ||
To integrate Rebotai into your GitHub repository, follow these steps: | ||
|
||
1. **Add Repository Secrets:** | ||
Go to your repository settings and add the following secrets: | ||
- `GH_TOKEN`: Your GitHub token | ||
- `OPENAI_API_KEY`: Your OpenAI API key | ||
|
||
2. **Add Repository Variables:** | ||
Add the following variables: | ||
- `MODEL`: The OpenAI model to use (e.g., `gpt-3.5-turbo`) | ||
- `LANGUAGE`: The preferred language for responses (e.g., `indonesia`) | ||
|
||
3. **Add GitHub Actions Workflow:** | ||
Create a new GitHub Actions workflow file (e.g., `.github/workflows/rebotai.yml`) with the following content: | ||
|
||
```yaml | ||
name: Rebotai Code Review | ||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
code_review: | ||
if: > | ||
github.event.issue.pull_request != null && | ||
contains(github.event.comment.body, '/review') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: fiqryq/rebotai@{version} | ||
with: | ||
gh-token: ${{ secrets.GH_TOKEN }} | ||
openai-api-key: ${{ secrets.OPENAI_API_KEY }} | ||
model: ${{ vars.MODEL }} | ||
language: ${{ vars.LANGUAGE }} | ||
``` | ||
## Example Responses | ||
Here are examples of responses in different languages based on the configured `LANGUAGE` variable: | ||
|
||
### Japanese | ||
```yaml | ||
language: ${{ vars.LANGUAGE }} # japan | ||
``` | ||
 | ||
|
||
### Indonesian | ||
```yaml | ||
language: ${{ vars.LANGUAGE }} # indonesia | ||
``` | ||
 | ||
|
||
### English | ||
```yaml | ||
language: ${{ vars.LANGUAGE }} # english | ||
``` | ||
 | ||
|
||
## Contributing | ||
We welcome contributions! Please feel free to submit issues or pull requests to improve Rebotai. | ||
|
||
## License | ||
This project is licensed under the MIT License. |