Skip to content

Commit 36bf2d9

Browse files
authored
feat: Add priority badges to PR review prompts (#69)
This commit enhances the PR review workflow by adding priority badges to the review comments. This allows for a more granular and organized feedback system, enabling developers to quickly identify the urgency of each suggested change. The following files have been modified: These changes introduce a new set of markdown badges for different priority levels (low, medium, high, critical, and unknown) and instruct Gemini CLI to prepend them to each review comment. This will improve the clarity and actionability of the code review process.
1 parent e9ddf24 commit 36bf2d9

File tree

2 files changed

+30
-80
lines changed

2 files changed

+30
-80
lines changed

.github/workflows/gemini-pr-review.yml

Lines changed: 15 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,28 @@ jobs:
235235
Once you have the information, provide a comprehensive code review by:
236236
1. Writing your review to a file: write_file("review.md", "<your
237237
detailed review feedback here>")
238+
238239
2. Posting the review:
239240
2.1 Use the mcp__github__create_pending_pull_request_review to create a Pending Pull Request Review.
241+
240242
2.2 Use the mcp__github__add_comment_to_pending_review to add comments to the Pending Pull Request Review. Inline comments are preffered whenever possible, so repeat this step, calling mcp__github__add_comment_to_pending_review, as needed. All comments about specific lines of code should use inline comments. It is preferred to use code suggestions when possible, which include a code block that is labeled "suggestion", which contains what the new code should be. An example is:
241243
{{COMMENT_TEXT}}
242244
```suggestion
243245
{{CODE_SUGGESTION}}
244246
```
247+
Prepend a priority emoji to each comment:
248+
- 🟢 for low priority
249+
- 🟡 for medium priority
250+
- 🟠 for high priority
251+
- 🔴 for critical priority
252+
- 🔵 if priority is unclear
253+
254+
Example:
255+
```
256+
🟠
257+
This is a high priority issue.
258+
```
259+
245260
2.3 Use the mcp__github__submit_pending_pull_request_review to submit the Pending Pull Request Review.
246261
247262
Review Areas:
@@ -270,46 +285,6 @@ jobs:
270285
- Highlight positive aspects of the implementation
271286
- Note any recurring themes across files
272287
273-
## 🎯 Specific Feedback
274-
(Only include sections below that have actual issues)
275-
276-
### 🔴 Critical
277-
278-
(Only include this section if there are critical issues)
279-
280-
Issues that must be addressed before merging (security
281-
vulnerabilities, breaking changes, major bugs):
282-
- **File: `filename:line`** - Description of critical issue with
283-
specific recommendation
284-
285-
### 🟡 High
286-
287-
(Only include this section if there are high priority issues)
288-
289-
Important issues that should be addressed (performance problems,
290-
design flaws, significant bugs):
291-
- **File: `filename:line`** - Description of high priority issue
292-
with suggested fix
293-
294-
### 🟢 Medium
295-
296-
(Only include this section if there are medium priority issues)
297-
298-
Improvements that would enhance code quality (style issues, minor
299-
optimizations, better practices):
300-
- **File: `filename:line`** - Description of medium priority improvement
301-
302-
### 🔵 Low
303-
304-
(Only include this section if there are suggestions)
305-
306-
Nice-to-have improvements and suggestions (documentation, naming,
307-
minor refactoring):
308-
- **File: `filename:line`** - Description of suggestion or
309-
enhancement **Note**: If no specific issues are found in any
310-
category, simply state "No specific issues identified in this
311-
review."
312-
313288
## ✅ Highlights
314289
315290
(Only include this section if there are positive aspects to

workflows/pr-review/gemini-pr-review.yml

Lines changed: 15 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,28 @@ jobs:
235235
Once you have the information, provide a comprehensive code review by:
236236
1. Writing your review to a file: write_file("review.md", "<your
237237
detailed review feedback here>")
238+
238239
2. Posting the review:
239240
2.1 Use the mcp__github__create_pending_pull_request_review to create a Pending Pull Request Review.
241+
240242
2.2 Use the mcp__github__add_comment_to_pending_review to add comments to the Pending Pull Request Review. Inline comments are preffered whenever possible, so repeat this step, calling mcp__github__add_comment_to_pending_review, as needed. All comments about specific lines of code should use inline comments. It is preferred to use code suggestions when possible, which include a code block that is labeled "suggestion", which contains what the new code should be. An example is:
241243
{{COMMENT_TEXT}}
242244
```suggestion
243245
{{CODE_SUGGESTION}}
244246
```
247+
Prepend a priority emoji to each comment:
248+
- 🟢 for low priority
249+
- 🟡 for medium priority
250+
- 🟠 for high priority
251+
- 🔴 for critical priority
252+
- 🔵 if priority is unclear
253+
254+
Example:
255+
```
256+
🟠
257+
This is a high priority issue.
258+
```
259+
245260
2.3 Use the mcp__github__submit_pending_pull_request_review to submit the Pending Pull Request Review.
246261
247262
Review Areas:
@@ -270,46 +285,6 @@ jobs:
270285
- Highlight positive aspects of the implementation
271286
- Note any recurring themes across files
272287
273-
## 🎯 Specific Feedback
274-
(Only include sections below that have actual issues)
275-
276-
### 🔴 Critical
277-
278-
(Only include this section if there are critical issues)
279-
280-
Issues that must be addressed before merging (security
281-
vulnerabilities, breaking changes, major bugs):
282-
- **File: `filename:line`** - Description of critical issue with
283-
specific recommendation
284-
285-
### 🟡 High
286-
287-
(Only include this section if there are high priority issues)
288-
289-
Important issues that should be addressed (performance problems,
290-
design flaws, significant bugs):
291-
- **File: `filename:line`** - Description of high priority issue
292-
with suggested fix
293-
294-
### 🟢 Medium
295-
296-
(Only include this section if there are medium priority issues)
297-
298-
Improvements that would enhance code quality (style issues, minor
299-
optimizations, better practices):
300-
- **File: `filename:line`** - Description of medium priority improvement
301-
302-
### 🔵 Low
303-
304-
(Only include this section if there are suggestions)
305-
306-
Nice-to-have improvements and suggestions (documentation, naming,
307-
minor refactoring):
308-
- **File: `filename:line`** - Description of suggestion or
309-
enhancement **Note**: If no specific issues are found in any
310-
category, simply state "No specific issues identified in this
311-
review."
312-
313288
## ✅ Highlights
314289
315290
(Only include this section if there are positive aspects to

0 commit comments

Comments
 (0)