mirror of
https://github.com/ingress-it-solutions/gitea-code-review-action.git
synced 2025-04-19 18:56:45 +00:00
commit
6214dcc4b2
1 changed files with 14 additions and 16 deletions
30
action.yaml
30
action.yaml
|
@ -28,17 +28,16 @@ inputs:
|
|||
PROMPT_TEMPLATE:
|
||||
description: 'The template for the FULL_REVIEW_COMMENT prompt.'
|
||||
default: 'Your task is to act as a code reviewer and review a pull request by summarizing the changes made, identifying potential issues related to logic and runtime, and creating a bullet list of action items needed before the change can be approved. The output should focus on items mentioned in the given code review checklist.
|
||||
Instructions:
|
||||
|
||||
Instructions:
|
||||
- Review the output of git diff for the pull request
|
||||
- Identify potential issues related to logic and runtime
|
||||
- Output as a markdown document, with the following sections:
|
||||
#### Overall Summary:
|
||||
### Overall Summary:
|
||||
- Each bullet point should provide the summary on what this Pull request does. Each point shouldnt exceed more than 14 words.
|
||||
#### Issues & Action Items:
|
||||
### Issues & Action Items:
|
||||
- Title of the check that it violated and a one liner guideline to user on how it can be fixed.
|
||||
- TODO List with the name of the file, violating policy and line no where you think it was violated.
|
||||
#### APPROVE / DISAPPROVE this PR:
|
||||
### APPROVE / DISAPPROVE this PR:
|
||||
- Tell me if this Pull request can be approved or not. if its disapproved just mention it clearly to fix the problem and raise another pull request. If its approved then appreciate everyone and say it can be approved.
|
||||
- If there are no issues, output "None"
|
||||
- If there are no action items, output "None"
|
||||
|
@ -92,24 +91,23 @@ inputs:
|
|||
- Notification
|
||||
- Event
|
||||
- Listener
|
||||
|
||||
If a class that contains too much business logic, it needs to be warn. "Too much" means that the cyclomatic complexity of the class is larger than 3.
|
||||
- Check for cyclomatic complexity
|
||||
If a class that contains too much business logic, it needs to be warn. "Too much" means that the cyclomatic complexity of the class is larger than 3.
|
||||
- Check for Principles
|
||||
Does the code follow the Single Responsibility Principle (SRP) and Dont Repeat Yourself (DRY) principle. If not explain where the user needs to make changes.
|
||||
Does the code follow the Single Responsibility Principle (SRP) and Dont Repeat Yourself (DRY) principle. If not explain where the user needs to make changes.
|
||||
- Check for naming conventions
|
||||
If a pull request code is violating the naming convention it needs to be warn.
|
||||
If a pull request code is violating the naming convention it needs to be warn.
|
||||
- Check for code complexity
|
||||
You should be focused on maintaining the code complexity level.
|
||||
You should be focused on maintaining the code complexity level.
|
||||
- Check for Error handling
|
||||
You should always check if the pull request code has a proper error handling.
|
||||
- Are all error scenarios covered in the code?
|
||||
- Are the error messages clear and helpful?
|
||||
- Is the code handling errors gracefully?
|
||||
You should always check if the pull request code has a proper error handling.
|
||||
- Are all error scenarios covered in the code?
|
||||
- Are the error messages clear and helpful?
|
||||
- Is the code handling errors gracefully?
|
||||
- Check for Security
|
||||
- Are sensitive data and credentials stored securely?
|
||||
- Are all external libraries and packages up-to-date?
|
||||
- Is the code protected against common security vulnerabilities such as SQL injection and cross-site scripting (XSS)?
|
||||
|
||||
\`\`\`
|
||||
${code}
|
||||
\`\`\`'
|
||||
|
@ -118,7 +116,7 @@ ${code}
|
|||
description: 'The template for the answer sent to the GitHub comment.'
|
||||
default: 'Raktbeej Code Review:
|
||||
|
||||
### Summary:
|
||||
## Summary:
|
||||
|
||||
${answer}'
|
||||
runs:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue