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

Commit d7f9486

Browse files
authored
move poem to the summary message (#442)
<!-- This is an auto-generated comment: release notes by OSS CodeRabbit --> ### Summary by CodeRabbit ``` - Refactor: Updated the prompt for final summarization response and release notes to provide a clear structure in markdown format. - Documentation: Included detailed instructions for crafting the final response, emphasizing user impact and categorizing changes appropriately. - Chore: Moved the poem section to the summary message to enhance readability and engagement. ``` <!-- end of auto-generated comment: release notes by OSS CodeRabbit -->
1 parent 9176623 commit d7f9486

File tree

2 files changed

+33
-73
lines changed

2 files changed

+33
-73
lines changed

action.yml

+17-20
Original file line numberDiff line numberDiff line change
@@ -206,33 +206,30 @@ inputs:
206206
required: false
207207
description: 'The prompt for final summarization response'
208208
default: |
209-
Provide your final response in the `markdown` format with
210-
the following content:
211-
- *Walkthrough*: A high-level summary of the
212-
overall change instead of specific files within 80 words.
213-
- *Changes*: A table of files and their summaries. You can group
214-
files with similar changes together into a single row to conserve
215-
space.
209+
Provide your final response in markdown with the following content:
210+
211+
- **Walkthrough**: A high-level summary of the overall change instead of
212+
specific files within 80 words.
213+
- **Changes**: A markdown table of files and their summaries. Group files
214+
with similar changes together into a single row to save space.
215+
- **Poem**: Below the changes, include a whimsical, short poem written by
216+
a rabbit to celebrate the changes. Format the poem as a quote using
217+
the ">" symbol and feel free to use emojis where relevant.
218+
219+
Avoid additional commentary as this summary will be added as a comment on the
220+
GitHub pull request. Use the titles "Walkthrough" and "Changes" and they must be H2.
216221
217-
Avoid additional commentary as this summary will be added as a
218-
comment on the GitHub pull request.
219222
summarize_release_notes:
220223
required: false
221224
description:
222225
'The prompt for generating release notes in the same chat as summarize
223226
stage'
224227
default: |
225-
Create concise release notes in `markdown` format for this pull request,
226-
focusing on its purpose and user story. You can classify the changes as
227-
"New Feature", "Bug fix", "Documentation", "Refactor", "Style",
228-
"Test", "Chore", "Revert", and provide a bullet point list. For example:
229-
"New Feature: An integrations page was added to the UI". Keep your
230-
response within 50-100 words. Avoid additional commentary as this response
231-
will be used as is in our release notes.
232-
233-
Below the release notes, generate a short, celebratory poem about the
234-
changes in this PR and add this poem as a quote (> symbol). You can
235-
use emojis in the poem, where they are relevant.
228+
Craft concise release notes for the pull request.
229+
Focus on the purpose and user impact, categorizing changes as "New Feature", "Bug Fix",
230+
"Documentation", "Refactor", "Style", "Test", "Chore", or "Revert". Provide a bullet-point list,
231+
e.g., "- New Feature: Added search functionality to the UI". Limit your response to 50-100 words
232+
and emphasize features visible to the end-user while omitting code-level details.
236233
language:
237234
required: false
238235
description: ISO code for the response language

src/prompts.ts

+16-53
Original file line numberDiff line numberDiff line change
@@ -99,63 +99,26 @@ $description
9999
$short_summary
100100
\`\`\`
101101
102-
## Instructions
103-
104-
The format for changes provided in the example below consists of
105-
multiple change sections, each containing a new hunk (annotated with
106-
line numbers), an old hunk, and optionally, existing comment chains.
107-
Note that the old hunk code has been replaced by the new hunk. Some
108-
lines on the new hunk may be annotated with line numbers.
109-
110-
Your task is to meticulously perform line-by-line review of new hunks,
111-
identifying substantial issues only. Respond only in the below example format,
112-
consisting of review sections. Each review section must have a line number range
113-
and a review comment for that range. Use separator after each review section.
114-
Line number ranges for each review section must be within the range of a specific
115-
new hunk. Start line number must belong to the same hunk as the end line number.
116-
Provide the exact line number range (inclusive) for each review comment. To leave
117-
a review comment on a single line, use the same line number for start and end.
118-
119-
Take into consideration the context provided by old hunks, comment threads, and
120-
file content during your review. Remember, the hunk under review is a fragment of a
121-
larger codebase and may not show all relevant sections, such as definitions,
122-
imports, or usage of functions or variables. Expect incomplete code fragments or
123-
references to elements defined beyond the provided context. Do NOT flag missing
124-
definitions, imports, or usages unless the context strongly suggests an issue.
125-
Do NOT restate information readily apparent in the code or the pull request.
126-
Do NOT provide general feedback, summaries, explanations of changes, or praises
127-
for making good additions. Do NOT question the developer's intentions behind the
128-
changes or warn them about potential compatibility issues with other dependencies.
129-
Avoid making assumptions about broader impacts beyond the given context or the
130-
necessity of the changes. Do NOT request the developer to review their changes.
131-
Given your knowledge may be outdated, it is essential to trust the developer when
132-
they appear to utilize newer APIs and methods. Presume the developer has
133-
exhaustively tested their changes and is fully aware of their system-wide
134-
implications. Focus solely on offering specific, objective insights based on the
135-
actual code and refrain from making broad comments about potential impacts on
136-
the system.
137-
138-
Use GitHub flavored markdown format for review comment text
139-
and fenced code blocks for code snippets using the relevant
140-
language identifier. Do NOT annotate the code snippet with
141-
line numbers. The code snippet must be correctly
142-
formatted & indented.
143-
144-
If applicable, you may provide a replacement snippet to fix
145-
issues within a hunk by using \`diff\` code blocks, clearly
146-
marking the lines that need to be added or removed with \`+\`
147-
and \`-\` annotations. The line number range for the review
148-
comment that includes a replacement snippet must precisely map
149-
to the line number range that has to be completely replaced
150-
within a hunk. Do NOT use \`suggestion\` code blocks for
151-
replacement snippets.
102+
## IMPORTANT Instructions
103+
104+
Input: New hunks annotated with line numbers and old hunks (replaced code). Hunks represent incomplete code fragments.
105+
Additional Context: PR title, description, summaries and comment chains.
106+
Task: Review new hunks for substantive issues using provided context and respond with comments if necessary.
107+
Output: Review comments in markdown with exact line number ranges in new hunks. Start and end line numbers must be within the same hunk. For single-line comments, start=end line number. Must use example response format below.
108+
Use fenced code blocks using the relevant language identifier where applicable.
109+
Don't annotate code snippets with line numbers. Format and indent code correctly.
110+
Do not use \`suggestion\` code blocks.
111+
For fixes, use \`diff\` code blocks, marking changes with \`+\` or \`-\`. The line number range for comments with fix snippets must exactly match the range to replace in the new hunk.
112+
113+
- Do NOT provide general feedback, summaries, explanations of changes, or praises
114+
for making good additions.
115+
- Focus solely on offering specific, objective insights based on the
116+
given context and refrain from making broad comments about potential impacts on
117+
the system or question intentions behind the changes.
152118
153119
If there are no issues found on a line range, you MUST respond with the
154120
text \`LGTM!\` for that line range in the review section.
155121
156-
Reflect on your comments thoroughly before posting them to
157-
ensure accuracy and compliance with the above guidelines.
158-
159122
## Example
160123
161124
### Example changes

0 commit comments

Comments
 (0)