Skip to content

Commit

Permalink
Merge pull request #13 from Louis-7/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Louis-7 authored Apr 18, 2023
2 parents 6ca7ea7 + c56dfff commit 9dd727a
Show file tree
Hide file tree
Showing 10 changed files with 43,679 additions and 39,715 deletions.
16 changes: 15 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
# The ID of your GitHub App
APP_ID=
WEBHOOK_SECRET=development
PRIVATE_KEY_PATH=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

# Use `trace` to get verbose logging or `info` to show less
LOG_LEVEL=debug

# Go to https://smee.io/new set this to the URL that you are redirected to.
WEBHOOK_PROXY_URL=
WEBHOOK_SECRET=

PORT=3600

# OpenAI API key
# https://platform.openai.com/account/api-keys
OPENAI_API_KEY=

# Settings for code review
# The path(s) to ignore, split path with `,` e.g. src/**/exclude
PATH_TO_EXCLUDE=
MAX_LINE_LIMITS=
1 change: 1 addition & 0 deletions .github/workflows/pr-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PATH_TO_EXCLUDE: action/**/*, package-lock.json, package.json
4 changes: 3 additions & 1 deletion action/core/code-review.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { Context } from "probot";
import { OpenAI } from './openai-helper';
export declare class CodeReview {
PATH_TO_EXCLUDE: string;
openai: OpenAI;
constructor();
review(context: Context<'pull_request.opened'>): Promise<void>;
review(context: Context<'pull_request.opened' | 'pull_request.synchronize'>): Promise<void>;
private generatePrompt;
private isExcluded;
}
1 change: 1 addition & 0 deletions action/core/openai-helper.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ export declare class OpenAI {
configuration: Configuration;
openai: OpenAIApi;
constructor();
test(): Promise<boolean>;
chat(messages: string[]): Promise<string>;
}
Loading

0 comments on commit 9dd727a

Please sign in to comment.