2.3 KiB
2.3 KiB
Contributing to pgmorbac
Thank you for your interest in contributing to pgmorbac!
How to Contribute
Reporting Bugs
If you find a bug, please open an issue with:
- A clear description of the bug
- Steps to reproduce
- Expected vs actual behavior
- PostgreSQL version
- Relevant logs or error messages
Suggesting Features
Feature requests are welcome! Please open an issue describing:
- The use case or problem you're trying to solve
- How the feature would work
- Whether it aligns with Multi-OrBAC model principles
Code Contributions
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes:
- Follow the existing code style (SQL formatting, naming conventions)
- Add tests in
tests/for new features - Update
docs/DOCUMENTATION.mdif adding new functionality
- Test your changes:
make check - Commit with clear messages:
git commit -m "Add feature: description" - Push to your fork:
git push origin feature/my-feature - Open a Pull Request with a description of your changes
Code Style Guidelines
- SQL: Use uppercase for keywords, lowercase for identifiers
- Naming: Use snake_case for tables, columns, functions
- Schema: All objects must be in the
morbacschema - Comments: Add comments for complex logic
- Functions: Include COMMENT ON statements for public functions
Testing
All changes must include tests:
- Add test cases in
tests/following the numbered file convention - Ensure all existing tests still pass (
make check) - Test against PostgreSQL 13+ (mention version in PR)
Documentation
- Update
DOCUMENTATION.mdfor API changes - Update
CHANGELOG.mdfollowing Keep a Changelog format - Keep
README.mdsimple (link to docs instead of expanding it)
Development Setup
# Install PostgreSQL (if not already installed)
brew install postgresql # macOS
# or use your package manager
# Clone your fork
git clone https://github.com/your-username/pgmorbac.git
cd pgmorbac
# Install the extension
make install
# Run tests
make check
Questions?
Feel free to open an issue for questions or discussion.
License
By contributing, you agree that your contributions will be licensed under the MIT License.