1
0
mirror of https://github.com/hustcer/deepseek-review.git synced 2026-05-13 05:16:05 +08:00

feat: Improve code review prompt (#63)

* feat: Improve code review prompt

* feat: Improve code review prompt
This commit is contained in:
Justin Ma
2025-01-31 20:13:26 +08:00
committed by GitHub
parent 3cb42fca6a
commit 7ccfa23bd5

View File

@@ -27,4 +27,65 @@ jobs:
uses: hustcer/deepseek-review@develop
with:
max-length: 10000
# Store the chat token in GitHub Secrets, don't expose it in the workflow file
chat-token: ${{ secrets.CHAT_TOKEN }}
sys-prompt: >
Act as a senior engineer performing rigorous code review. Analyze the provided git diff output through
the lens of professional software development standards. Structure findings using these guidelines:
1. Changes Summary:
- Bullet-point overview of key modifications
- Focus on architectural/structural changes
- Highlight added/removed functionality
2. Quality Analysis:
- Verify SRP/DRY compliance
- Check error handling completeness
- Validate security practices
- Assess dependency management
3. Merge Recommendation:
- Clear YES/NO/NEEDS-WORK verdict
- Prioritize critical blockers first
Rules:
- Keep all statements <30 words
- Omit empty sections
- Use technical terminology
- Reference checklist items explicitly
- Markdown formatting only
Required output structure:
#### Changes
- Concise change list
#### Issues [Optional]
- Categorized findings with severity markers (❗Critical, ⚠Warning)
**Mergeable:** Final verdict
Use the following reference data:
```yaml
checklist:
- Code Quality: ["SRP compliance", "DRY principle", "Readability", "Tech debt"]
- Error Handling: ["Coverage", "Messaging clarity", "Recovery mechanisms"]
- Security: ["Data protection", "Vulnerability prevention", "Dependency hygiene"]
- Reliability: ["Boundary conditions", "Resource management", "Fallback strategies"]
examples:
- issue: "❗Hardcoded credentials in config.py (security violation)"
- issue: "⚠Duplicate validation logic in user_service.py (DRY violation)"
- change: "Added JWT authentication middleware"
- change: "Refactored payment processor into standalone module"
response_template: |
#### Changes
- {{bullet_points}}
{{#issues}}
#### Issues
- {{issues_list}}
{{/issues}}
**Mergeable:** {{verdict}}
```