Skip to content

Commit

Permalink
Update readme & remove line breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
skylus committed May 11, 2023
1 parent c8dfd08 commit d9d1501
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# chatgpt-reviewer-github-action

GitHub action that provides a service for adding review comments to a pull request on GitHub. This service uses the GitHub REST API and the OpenAI API to generate suggestions for pull request changes.
GitHub action that adds ChatGPT code review comments to pull requests. This service uses the GitHub REST API and the OpenAI API to generate suggestions for pull request changes.

### Before you start

Expand All @@ -15,9 +15,9 @@ By using this repository you acknowledge and approve of the fact that:

To use this github action, you will need to have a GitHub account and an OpenAI API key. Also you will need to configure a GitHub action workflow.

1. Visit https://platform.openai.com/account/api-keys to generate a new OpenAi Api key.
1. Visit https://platform.openai.com/account/api-keys to generate a new OpenAI API key.
2. Add new key with a name `OPENAI_API_KEY` as described [here](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository). As a value set generated OpenAi Api key from the step 1
4. In a repository you want to run this action, create a file: `.github/workflows/chatgpt-reviewer-github-action.yml` with the next content:
3. In a repository you want to run this action, create a file: `.github/workflows/chatgpt-reviewer-github-action.yml` with the next content:
```yml
name: chatgpt-reviewer-github-action
run-name: chatgpt-reviewer-github-action
Expand All @@ -34,6 +34,8 @@ To use this github action, you will need to have a GitHub account and an OpenAI
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
```
Note that `secrets.GITHUB_TOKEN` is provided to you automatically by GitHub.

---

### About
Expand Down
2 changes: 0 additions & 2 deletions src/services/commentOnPullRequestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ type PullRequestInfo = {

class CommentOnPullRequestService {
private readonly octokitApi: Octokit;

private readonly openAiApi: OpenAIApi;

private readonly pullRequest: PullRequestInfo;

constructor() {
Expand Down

0 comments on commit d9d1501

Please sign in to comment.