This document provides guidelines for good development practices on bricks. These guidelines are used within Gencovery to maintain a high standard of code quality, security, and maintainability across all bricks in the GWS Core architecture.
Git workflow
- Always create a new branch for each feature or bug fix, following the naming convention:
feature/your-feature-name or fix/your-bug-description.
- Regularly commit your changes with clear and descriptive commit messages that explain the purpose of the change.
- Before pushing your branch, ensure that your code is properly formatted.
- When your feature or bug fix is complete, verify that the tests are passing and that you have added tests for any new functionality.
- Then open a pull request (PR) from your branch, against the main (or master) branch. In Github > Repository > Pull Request. Provide a clear description of the changes made and any relevant context for reviewers.
- If GitHub Copilot is configured in your brick (check
gws brick configure) and repository, the code review will be triggered automatically and Copilot will provide feedback. It may takes some times, so wait for Copilot to finish. Fix any issues or suggestions raised by Copilot and update your PR accordingly.
- Request reviews from at least one other team member. Address any feedback received and make necessary changes before merging.
- Before merging, you can declare the new brick version in the
settings.json file, then re-push the code.
- Once the PR is clean, merge it (with or without a squash).
- Then you can delete your feature branch to keep the repository clean.
- If you delete it from Github you will need to delete it in your local environment, then run
git fetch --prune to refresh you git graph.