-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add pr title validation feature #65
Conversation
WalkthroughThe recent updates bring a GitHub Actions workflow for PR title validation and enhance Docker setups for Angular, .NET, and Node.js projects. These improvements aim to streamline development processes by automating validations and optimizing container configurations. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Out of diff range and nitpick comments (3)
docker-setups/nodejs-github.md (1)
171-175
: Add a description for theCOMPOSE_PROJECT_NAME
environment variable to clarify its purpose.docker-setups/angular-docker.md (1)
329-335
: Clarify the purpose of theCOMPOSE_PROJECT_NAME
environment variable in the documentation.docker-setups/dotnet-github.md (1)
252-256
: Add a description for theCOMPOSE_PROJECT_NAME
environment variable to clarify its purpose.
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- .github/workflows/pr_title_validation.yml (1 hunks)
- docker-setups/angular-docker.md (4 hunks)
- docker-setups/dotnet-github.md (5 hunks)
- docker-setups/nodejs-github.md (3 hunks)
- validate_title.py (1 hunks)
Additional comments not posted (4)
validate_title.py (1)
4-22
: Ensure the validation script handles edge cases and provides clear error messages.docker-setups/nodejs-github.md (1)
114-118
: Ensure the volume configuration in the Docker Compose file is correctly set up for data persistence.docker-setups/angular-docker.md (1)
204-206
: Ensure the Docker Compose configuration correctly sets the application name and image.docker-setups/dotnet-github.md (1)
Line range hint
111-134
: Ensure the Docker Compose configuration correctly sets up the .NET application and MariaDB service.
uses: actions/checkout@v3 | ||
|
||
- name: Run validation script | ||
run: python validate_title.py "${{ github.event.pull_request.title }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid direct interpolation of user input in the run
command to prevent potential security risks.
- run: python validate_title.py "${{ github.event.pull_request.title }}"
+ env:
+ PR_TITLE: ${{ github.event.pull_request.title }}
+ run: python validate_title.py "$PR_TITLE"
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
run: python validate_title.py "${{ github.event.pull_request.title }}" | |
env: | |
PR_TITLE: ${{ github.event.pull_request.title }} | |
run: python validate_title.py "$PR_TITLE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the code as per the suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sujoy-pal144, thank you for updating the code as suggested! It's great to see the security enhancement in place. If you need further assistance or have more questions, feel free to ask. Happy coding! 🚀
If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/pr_title_validation.yml (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- .github/workflows/pr_title_validation.yml
Not required |
New Feature-
To validate PR Title
The github workflow will be triggered when the PR is opened, reopened or edited.
PR Validations -
Summary by CodeRabbit
New Features
Documentation