-
Notifications
You must be signed in to change notification settings - Fork 1
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
13 changed files
with
20,094 additions
and
100 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,4 +1,3 @@ | ||
lib/ | ||
dist/ | ||
node_modules/ | ||
.vscode/ |
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,5 @@ | ||
# Changelog | ||
|
||
## 1.0.0 - 2023-01-01 | ||
## 0.0.1 - 2023-01-09 | ||
|
||
Initial release |
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,29 +1,48 @@ | ||
# OpenAI Code Analyzer | ||
# OpenAI Chat | ||
|
||
Analyses code pushed using OpenAI | ||
Uses OpenAI to reply to comments submitted | ||
|
||
![comment](sample.png) | ||
|
||
## Usage | ||
|
||
``` | ||
- uses: fukumone/[email protected] | ||
with: | ||
openai-api-key: 'xxx' | ||
on: | ||
issue_comment: | ||
types: [created] | ||
jobs: | ||
action: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/openai ') | ||
steps: | ||
- name: OpenAI Chat | ||
uses: fukumone/[email protected] | ||
with: | ||
openai-api-key: ${{ secrets.OPENAI_API_KEY }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
github-comment: ${{ github.event.comment.body }} | ||
``` | ||
|
||
This action is triggered when a comment is posted on an issue or pull request, and the comment body starts with `/openai`. It uses the `openai-api-key`, `github-token`, and `github-comment` inputs to perform the action. | ||
|
||
Make sure to set the trigger to `/openai` as shown in the example above. | ||
|
||
## Options | ||
|
||
### Required | ||
|
||
Name | Allowed values | Description | ||
Name | default value | Description | ||
-- | -- | -- | ||
`openai-api-key` || Please enter the secret key you need to use open ai. | ||
`openai-api-key` || Your openai api key | ||
`github-comment` || The comment that was posted on GitHub | ||
`github-token` || GitHub access token with permissions to access the repository where the comment was posted | ||
|
||
### Optional | ||
|
||
Name | Allowed values | Description | ||
Name | default value | Description | ||
-- | -- | -- | ||
`model` | text-davinci-003 | | ||
`model` | text-davinci-003 | engine to use for completion | ||
|
||
## License | ||
|
||
The scripts and documentation in this project are released under the MIT License | ||
The scripts and documentation in this project are released under the [MIT](./LICENSE) License |
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
Oops, something went wrong.