Add version hierarchy validation and CI improvements for version management #28
Merged
Copilot
merged 5 commits from 2026-01-04 01:30:13 +00:00
copilot/prevent-version-creation-errors into main
No Reviewers
Labels
Clear labels
automation
breaking-change
bug
build
ci-cd
config
css
dependencies
deploy-failure
docker
documentation
dolibarr
duplicate
enhancement
generic
good first issue
health-check
health: excellent
health: fair
health: good
health: poor
help wanted
html
invalid
javascript
joomla
major-release
minor-release
mokostandards
needs-changelog
needs-review
needs-testing
patch-release
php
priority: critical
priority: high
priority: low
priority: medium
push-failure
python
question
regression
release
release-candidate
security
size/l
size/m
size/s
size/xl
size/xs
size/xxl
standards-drift
standards-update
standards-violation
status: blocked
status: in-progress
status: on-hold
status: pending
status: wontfix
sync-failure
sync-report
template-validation-failure
test-failure
tests
type: bug
type: chore
type: enhancement
type: feature
type: refactor
type: release
type: test
type: version
typescript
version
version-branch
version-drift
version-update
wontfix
work-in-progress
bug
chore
documentation
enhancement
feature
priority: critical
priority: high
priority: low
priority: medium
refactor
scope: client
scope: dolibarr
scope: infrastructure
scope: joomla
scope: waas
security
status: blocked
status: duplicate
status: in-progress
status: needs-review
status: wontfix
Automated processes or scripts
Breaking API or functionality change
Something isn't working
Build system changes
CI/CD pipeline changes
Configuration file changes
CSS/styling changes
Dependency updates
Automated deploy failure tracking
Docker configuration changes
Documentation changes
Dolibarr module or extension
This issue or pull request already exists
New feature or request
Generic project or library
Good for newcomers
Repository health check results
Health score 90-100
Health score 50-69
Health score 70-89
Health score below 50
Extra attention is needed
HTML template changes
This doesn't seem right
JavaScript code changes
Joomla extension or component
Major version release (breaking changes)
Minor version release (XX.YY.00)
MokoStandards compliance
Awaiting code review
Requires manual or automated testing
Patch version release (XX.YY.ZZ)
PHP code changes
Critical priority, must be addressed immediately
High priority
Low priority
Medium priority
File push failure requiring attention
Python code changes
Further information is requested
Regression from a previous working state
Release related PR
Release candidate build
Security-related changes
Large change (101-300 lines)
Medium change (31-100 lines)
Small change (11-30 lines)
Extra large change (301-1000 lines)
Extra small change (1-10 lines)
Extremely large change (1000+ lines)
Repository drifted from MokoStandards
MokoStandards sync update
Standards compliance failure
Blocked by another issue or dependency
Currently being worked on
Temporarily on hold
Pending action or decision
This will not be worked on
Bulk sync failure requiring attention
Bulk sync run report
Template workflow validation failure
Automated test failure
Test suite changes
Something isn't working
Maintenance tasks
Enhancement to existing feature
New feature or request
Code refactoring
Release preparation or tracking
Test suite additions or changes
Version-related change
TypeScript code changes
Version bump or release
Version branch related
Version mismatch detected
Version bump and release PR
This will not be worked on
Work in progress, not ready for merge
Something is not working
Maintenance and housekeeping
Documentation improvements
Improvement to existing functionality
New feature or request
Must fix immediately
Should fix soon
Nice to have
Fix when convenient
Code restructuring without behavior change
Client-specific work
Dolibarr modules and customizations
Server, CI, backups, monitoring
Joomla templates and extensions
MokoWaaS platform
Security vulnerability or hardening
Waiting on external dependency
Duplicate of another issue
Being worked on
Ready for review
Will not be addressed
No Label
Milestone
No items
No Milestone
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: MokoConsulting/MokoCassiopeia#28
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "copilot/prevent-version-creation-errors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull Request
Purpose
Implements version hierarchy validation in the GitHub Actions workflow to prevent creating version numbers in lower priority branches when they already exist in higher priority branches. Additionally adds comprehensive CI scripts and tools for version management and validation.
Change Summary
Added validation logic to the
version_branch.ymlworkflow that enforces a three-tier version hierarchy:Rules enforced:
rc/X.Y.Z, workflow blocks ifversion/X.Y.Zalready existsdev/X.Y.Z, workflow blocks ifversion/X.Y.Zorrc/X.Y.Zalready existsversion/X.Y.Zis always allowed (highest priority)Workflow changes:
branch_prefixinput parameter with options:dev/,rc/,version/(defaults todev/)dev/only)New CI scripts added:
scripts/validate/version_hierarchy.sh- Validates version hierarchy across all branch prefixes, detecting conflicts between dev/, rc/, and version/ branchesscripts/validate/workflows.sh- Validates GitHub Actions workflow YAML files for syntax errors, tabs, and proper structurescripts/run/list_versions.sh- Lists all version branches organized by prefix with visual indicators and sorted outputscripts/run/check_version.sh- Interactive tool to check if a version can be created safely in a specific branch prefix before attempting creationCI workflow enhancements:
workflows.shto required validations (ensures workflow YAML is always valid)version_hierarchy.shto optional validations (catches version conflicts early in CI)scripts/README.mdwith comprehensive documentation for all new scriptsTesting Evidence
Test scenarios validated:
Risk and Rollback
Risk Level: Low
dev/prefix for backward compatibilityRollback Plan:
2534fd3,d89744d,de6b404andd09cf9cChecklist
Reviewer Notes
The workflow now prevents duplicate version numbers across different branch prefixes, addressing the requirement: "if a version number exists in version/ do not create in rc or /dev and if version number exists in rc do not create in dev/"
Users can now select which branch prefix to use when triggering the workflow via the new
branch_prefixdropdown input, enabling proper version progression through the development lifecycle: dev → rc → version.Additionally, four new enterprise-standard scripts provide comprehensive version management capabilities:
All new scripts include proper error handling, follow bash best practices, and are optimized for performance (using bash built-ins where appropriate).
Review and Approval
Awaiting review and approval.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
@copilot continue
@copilot search is satlling with error
$ cd /home/runner/work/moko-cassiopeia/moko-cassiopeia && find . -type f -name "*.sh" | xargs grep -l "version" | grep -E "(release|fix)" | head -10 ./scripts/release/update_changelog.sh ./scripts/release/update_dates.sh ./scripts/fix/tabs.sh ./scripts/fix/paths.sh ./scripts/fix/versions.sh <exited with exit code 0>
The implementation is complete. I've added version hierarchy validation to the workflow in commit
d09cf9c.The changes enforce these rules:
The workflow now accepts a
branch_prefixinput parameter (dev/, rc/, or version/) and validates the version hierarchy before creating the branch.@copilot add other improvements and additonal ci scripts
Added CI improvements and version management scripts in commits
d89744dand2534fd3.New features:
The improvements include:
scripts/validate/version_hierarchy.sh- validates no version conflicts across branchesscripts/validate/workflows.sh- validates workflow YAML syntaxscripts/run/list_versions.sh- lists all version branches by prefixscripts/run/check_version.sh- checks if a version can be created safelyAll scripts tested and follow enterprise standards.