Skip to content

Commit

Permalink
first release
Browse files Browse the repository at this point in the history
  • Loading branch information
fukumone committed Jan 9, 2023
1 parent 19c9e90 commit 174ecc2
Show file tree
Hide file tree
Showing 13 changed files with 20,094 additions and 100 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
lib/
dist/
node_modules/
.vscode/
2 changes: 1 addition & 1 deletion CHANGELOG.md
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
39 changes: 29 additions & 10 deletions README.md
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
11 changes: 7 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: "OpenAI Code Analyzer"
description: "OpenAI-based Code Analysis Library"
name: "OpenAI Chat"
description: "Uses OpenAI to reply to comments submitted"
author: fukumone
branding:
icon: check-square
color: green
inputs:
openai-api-key: # id of input
openai-api-key:
description: 'Your openai api key'
required: true
github-comment:
description: 'The comment that was posted on GitHub'
require: true
github-token:
description: "Github token"
description: "GitHub access token with permissions to access the repository where the comment was posted"
required: true
model:
description: 'The model to use'
Expand Down
Loading

0 comments on commit 174ecc2

Please sign in to comment.