From 78a09c8daa3725ea8aba41bb195beba2fbb72adf Mon Sep 17 00:00:00 2001 From: Harjot Gill Date: Sat, 25 Mar 2023 16:13:55 -0700 Subject: [PATCH] update readme (#91) --- README.md | 9 +++++---- action.yml | 12 ++++++------ src/review-comment.ts | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index dd5e684f..d06f6b3e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# OpenAI GPT based PR reviewer and summarizer +# OpenAI ChatGPT based PR reviewer and summarizer ![AI](./docs/images/ai.png) ## Overview -This [OpenAI Chat](https://platform.openai.com/docs/guides/chat) based GitHub +This [OpenAI ChatGPT](https://platform.openai.com/docs/guides/chat) based GitHub Action provides a summary, release notes and review of pull requests. The prompts have been tuned for a concise response. To prevent excessive notifications, this action can be configured to skip adding review comments when @@ -68,11 +68,12 @@ See also: [./action.yml](./action.yml) You can reply to a review comment made by this action and get a response based on the diff context. Additionally, you can invite the bot to a conversation by -mentioning it in the beginning of the comment with `@openai`. +tagging it in the comment (`@openai`). -Example: +Examples: > @openai Can you please review this block of code? +> @openai Please generate a test plan for this file. Note: A review comment is a comment made on a diff or a file in the pull request. diff --git a/action.yml b/action.yml index a80129dc..e344807e 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ -name: 'OpenAI-based PR Reviewer & Summarizer' -description: 'OpenAI-based PR Reviewer and Summarizer' +name: 'OpenAI ChatGPT based PR Reviewer & Summarizer' +description: 'OpenAI ChatGPT based PR Reviewer and Summarizer' branding: icon: 'aperture' color: 'orange' @@ -63,15 +63,15 @@ inputs: openai_retries: required: false description: - 'How many times to retry openai API in case of timeouts or errors?' + 'How many times to retry OpenAI API in case of timeouts or errors?' default: '5' openai_timeout_ms: required: false - description: 'Timeout for openai API call in millis' - default: '60000' + description: 'Timeout for OpenAI API call in millis' + default: '120000' openai_concurrency_limit: required: false - description: 'How many concurrent API calls to make to openai servers?' + description: 'How many concurrent API calls to make to OpenAI servers?' default: '4' system_message: required: false diff --git a/src/review-comment.ts b/src/review-comment.ts index a911b862..1e131927 100644 --- a/src/review-comment.ts +++ b/src/review-comment.ts @@ -79,7 +79,7 @@ export const handleReviewComment = async ( if ( comment_chain.includes(COMMENT_TAG) || comment_chain.includes(COMMENT_REPLY_TAG) || - comment.body.startsWith(ASK_BOT) + comment.body.includes(ASK_BOT) ) { let file_content = '' try {