- Contributing
Ansible is one of those things that often becomes very messy. The reason we strictly enforce coding standards from the outset is twofold:
- To make sure the project is extensible over time
- To ensure that people other than the original author can maintain, update, or extend the codebase
See Coding Style Good Practices for Ansible
For writing Python modules:
See PEP 8 - Style Guide for Python Code
See Good Practices for Ansible
For Ansible, use Ansible Lint
There is an Ansible linter extension for vscode
For Python, use Python Linter
<type>(<scope>): <short description>
<long description>
BREAKING CHANGE: <explanation of breaking change>
References: <issue/ticket numbers, links, or additional resources>.
When referencing issues make sure to use #<github #> because this will autolink in GitHub
- Types describe the purpose of the commit. Commonly used types include:
- feat: a new feature
- fix: a bug fix
- chore: general tasks or maintenance (e.g., updating dependencies)
- docs: documentation changes
- refactor: code refactoring without changing functionality
- test: adding or updating tests
- style: formatting, whitespace, etc. (no functional code changes)
- perf: performance improvements
- build: changes that affect the build system or dependencies
- Scope is optional but helps with clarity if you’re working in a large project.
- It could refer to the affected module, component, or feature, such as
auth
,api
,database
, etc.
- A concise, one-line summary of what was done (use the imperative mood, e.g., “add,” “fix”).
- Expand on what you did and why if it’s not obvious from the short description. Mention key details that may help other contributors.
- Use this section to explain changes that are incompatible with previous versions.
- Include links to relevant issues, tickets, or documentation.
feat(auth): add token-based authentication
Introduced JWT for authentication, replacing the previous session-based method.
Updated user model to support token generation and added necessary middleware.
BREAKING CHANGE: Removed session-based authentication methods, requiring clients to use JWT.
References: #123
fix(api): correct null pointer issue in user endpoint
Fixed a null pointer exception that occurred when querying a non-existent user.
Added input validation to return a 404 for missing users, improving API stability.
References: #456
docs(database): update setup instructions for PostgreSQL 13
Added instructions for PostgreSQL 13 configuration, reflecting recent dependency updates.
Clarified environment variable setup for newcomers.
References: internal Confluence link or any relevant resources
perf(api): optimize query performance for large datasets
Improved the data retrieval logic, reducing query time by an average of 30%.
Applied batch processing to handle larger sets more efficiently.
References: #789
We follow the Forking Workflow
We always rebase rather than merge commit. See Rebase vs Merge
Multiple commits must be squashed to logical chunks following the formatting outlined in git Commit Formatting