-
Notifications
You must be signed in to change notification settings - Fork 0
Fix semantic versioning and add hooks #54
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
Conversation
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🟢 | Statements | 86.58% | 1135/1311 |
| 🟡 | Branches | 70.31% | 450/640 |
| 🟢 | Functions | 86.62% | 123/142 |
| 🟢 | Lines | 87.35% | 1119/1281 |
Test suite run success
276 tests passing in 31 suites.
Report generated by 🧪jest coverage report action from 7392552
🔒 CodeQL Security Analysis ResultsCodeQL analysis has been completed for this pull request. Language: javascript 📊 View detailed results: Check the Security tab for complete findings. 💡 Next steps:
This comment was generated automatically by CodeQL Analysis |
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.
Pull Request Overview
This pull request enhances the CI/CD pipeline to properly handle semantic versioning and adds Git hooks to enforce conventional commit standards across the development workflow.
- Improved semantic version detection by parsing semantic-release output directly instead of using the
@semantic-release/execplugin - Added comprehensive documentation for Git hooks installation and conventional commit format requirements
- Enhanced error messages in the deployment workflow to help developers diagnose versioning issues
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| README.md | Added Development Setup section documenting Git hooks installation and conventional commit message format requirements with examples |
| .github/workflows/deploy-to-dev.yaml | Refactored version extraction to parse semantic-release output directly and improved error messaging for better debugging |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| echo "$SEMANTIC_OUTPUT" | ||
| # Extract version from semantic-release output | ||
| SEMANTIC_VERSION=$(echo "$SEMANTIC_OUTPUT" | grep -oP "The next release version is \K[0-9]+\.[0-9]+\.[0-9]+" || echo "") |
Copilot
AI
Nov 20, 2025
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.
The -P flag for grep (Perl-compatible regex) is not available in all Unix-like systems, including macOS and some minimal Linux containers. GitHub Actions runners typically use Ubuntu with GNU grep which supports -P, but this could fail in other environments.
Consider using a more portable approach with basic regex or awk:
SEMANTIC_VERSION=$(echo "$SEMANTIC_OUTPUT" | grep -o "The next release version is [0-9]\+\.[0-9]\+\.[0-9]\+" | sed 's/The next release version is //' || echo "")Or using awk:
SEMANTIC_VERSION=$(echo "$SEMANTIC_OUTPUT" | awk '/The next release version is/ {print $NF}' || echo "")| SEMANTIC_VERSION=$(echo "$SEMANTIC_OUTPUT" | grep -oP "The next release version is \K[0-9]+\.[0-9]+\.[0-9]+" || echo "") | |
| SEMANTIC_VERSION=$(echo "$SEMANTIC_OUTPUT" | grep -o "The next release version is [0-9]\+\.[0-9]\+\.[0-9]\+" | sed 's/The next release version is //' || echo "") |
| echo "Please use conventional commit format:" | ||
| echo " feat: for new features (minor version bump)" | ||
| echo " fix: for bug fixes (patch version bump)" |
Copilot
AI
Nov 20, 2025
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.
The error message being expanded here is incomplete. The grep pattern on line 85 checks for feat|fix|docs|chore|refactor|test|perf|ci|build|style, but the error message only lists feat, fix, docs, chore, refactor, and test (lines 96-101).
Consider adding the missing types to provide complete guidance:
echo " perf: for performance improvements (patch version bump)"
echo " ci: for CI/CD changes (patch version bump)"
echo " build: for build system changes (patch version bump)"
echo " style: for code formatting (patch version bump)"
No description provided.