Skip to content

Commit

Permalink
Merge pull request #37 from ingress-it-solutions/dev
Browse files Browse the repository at this point in the history
Laravel Specific
  • Loading branch information
vandanafuletra authored Dec 23, 2023
2 parents 2e341dc + 35136c6 commit be18a2b
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ inputs:
default: 'github'
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.
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:
- 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:
- Each bullet point should provide the summary on what this Pull request does. Each point shouldn't exceed more than 14 words.
- Each bullet point should provide the summary on what this Pull request does. Each point shouldnt exceed more than 14 words.
#### 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:
- 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'
- If there are no issues, output "None"
- If there are no action items, output "None"
- Create a bullet list of action items needed before the change can be approved
- The response sentences are no longer than 16 words each
- Keep the response sentences as short as possible
Expand All @@ -53,21 +53,21 @@ inputs:
- A call to static Model functions in the loop such as Product::find()
- A call to Model functions in the loop such as $product->save()
- Check for Missing whenLoaded() calls:
If a pull request shows push an HTTP resource class you will check if pull request code used the whenLoaded() helper provided by Laravel. It's a great way to avoid N+1 and performance issues.
If a pull request shows push an HTTP resource class you will check if pull request code used the whenLoaded() helper provided by Laravel. It is a great way to avoid N+1 and performance issues.
- Check for Missing DB index in migration:
If a pull request code push a migration we check if it has added any kind of index to new columns. The full path has to include migration in order to trigger this check.
- Check for Missing down method in migration:
If a pull request code push a migration we check if it has a down method and it's not empty. The full path has to include migration in order to trigger this check.
If a pull request code push a migration we check if it has a down method and it is not empty. The full path has to include migration in order to trigger this check.
- Check for Missing foreign key in migration:
If a pull request code create a new column that ends with _id you will warn if a pull request code forgot to add a foreign key to that column.
- Check for Missing authorization in request:
If a pull request code push an HTTP request we check if it has an authorize method and it's not return true. The filename must end with Request.php or the full path has to include Requests in order to trigger this check.
If a pull request code push an HTTP request we check if it has an authorize method and it is not return true. The filename must end with Request.php or the full path has to include Requests in order to trigger this check.
- Check for Validation in controller:
If a pull request code push a controller we check if it uses any kind of validator. Usually, it's a better idea to move this logic to a Request class. The filename must end with Controller.php or the full path has to include Controllers in order to trigger this check.
If a pull request code push a controller we check if it uses any kind of validator. Usually, it is a better idea to move this logic to a Request class. The filename must end with Controller.php or the full path has to include Controllers in order to trigger this check.
- Check for Missing ENV variable:
If a pull request code added a new key to one of the config file we check if a pull request code also included it in the .env.example file
- Check for env() call outside of config files:
If a pull request code contains an env() call anywhere outside of a config file it needs to be warn. It's a best practice to only use env() in config files.
If a pull request code contains an env() call anywhere outside of a config file it needs to be warn. It is a best practice to only use env() in config files.
- Check for Forgotten cache keys New:
If a pull request code contains a Cache::rememberForever() call It needs to be warn.
- Check for Validation with reference to Request that has non nullable database table column in migration.
Expand All @@ -92,7 +92,7 @@ inputs:
- 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.
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.
- Check for naming conventions
Expand All @@ -119,7 +119,7 @@ ${code}
### Summary:
${answer}"
${answer}'
runs:
using: 'node16'
main: 'dist/index.js'

0 comments on commit be18a2b

Please sign in to comment.