Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Commit 3f4d301

Browse files
authored
update readme (#48)
<!-- This is an auto-generated comment: release notes by openai --> ### Summary by OpenAI Documentation: Added instructions to add a file to the repository and screenshots of PR summary, release notes, review, and conversation in the README file. Additionally, tips were added to `src/review.ts` for follow-up questions and inviting the bot into a review conversation. <!-- end of auto-generated comment: release notes by openai -->
1 parent 1a37167 commit 3f4d301

File tree

5 files changed

+32
-14
lines changed

5 files changed

+32
-14
lines changed
File renamed without changes.

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ NOTES:
2525

2626
## Usage
2727

28+
Add the below file to your repository at
29+
`.github/workflows/openai-pr-reviewer.yml`
30+
2831
```yaml
2932
name: Code Review
3033

@@ -57,14 +60,6 @@ jobs:
5760
review_comment_lgtm: false
5861
```
5962
60-
### Screenshots
61-
62-
![PR Summary](./docs/images/openai-pr-summary.png)
63-
64-
![PR Release Notes](./docs/images/openai-pr-release-notes.png)
65-
66-
![PR Review](./docs/images/openai-pr-review.png)
67-
6863
### Configuration
6964
7065
See also: [./action.yml](./action.yml)
@@ -79,6 +74,16 @@ Example:
7974

8075
> @openai Can you please review this block of code?
8176

77+
### Screenshots
78+
79+
![PR Summary](./docs/images/openai-pr-summary.png)
80+
81+
![PR Release Notes](./docs/images/openai-pr-release-notes.png)
82+
83+
![PR Review](./docs/images/openai-pr-review.png)
84+
85+
![PR Conversation](./docs/images/openai-review-conversation.png)
86+
8287
#### Environment variables
8388

8489
- `GITHUB_TOKEN`: This should already be available to the GitHub Action

dist/index.js

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
256 KB
Loading

src/review.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,17 @@ export const codeReview = async (
166166
} else {
167167
inputs.summary = summarize_final_response
168168

169+
const summarize_comment = `${summarize_final_response}
170+
171+
---
172+
173+
Tips:
174+
- You can reply on the review comment left by this bot to ask follow-up questions.
175+
- You can invite the bot into a review conversation by typing \`@openai\` in the beginning of the comment.
176+
`
177+
169178
next_summarize_ids = summarize_final_response_ids
170-
await commenter.comment(
171-
`${summarize_final_response}`,
172-
SUMMARIZE_TAG,
173-
'replace'
174-
)
179+
await commenter.comment(`${summarize_comment}`, SUMMARIZE_TAG, 'replace')
175180
}
176181

177182
// final release notes

0 commit comments

Comments
 (0)