Skip to main content

Contributing

Coding standards​

note

All coding standards are enforced via the continuous integration (CI) workflow.

Refer to ci-cd.md for more details.

note

We run various coding standard tools via Git hooks (refer to .lintstagedrc.mjs).

tip

In urgent situations, you can skip Git hooks using the --no-verify flag during commits.

e.g. git commit --no-verify -m "fix: your commit message"

Global​

Prettier​

Source: https://github.com/prettier/prettier
How to install: automatically installed by NPM
How to run: npx prettier

EditorConfig​

Source: https://github.com/editorconfig
How to install: automatically installed by Composer
How to run: automatically applied by any modern IDE

PHP​

PHP_CodeSniffer​

Source: https://github.com/PHPCSStandards/PHP_CodeSniffer
How to install: automatically installed by Composer
How to run: composer run-script phpcs

Docker​

Hadolint​

Source: https://github.com/hadolint/hadolint
How to install: https://github.com/hadolint/hadolint?tab=readme-ov-file#install
How to run: hadolint Dockerfile

Terraform​

TFLint​

Source: https://github.com/terraform-linters/tflint
How to install: https://github.com/terraform-linters/tflint?tab=readme-ov-file#installation
How to run: tflint --recursive --config=$(realpath .tflint.hcl) -f compact (cwd: infra/terraform/)

Versioning​

We use Semantic Versioning for our versioning. New versions are managed by release-please.

Commit messages (and pull request titles)​

Please write meaningful commit messages. This helps us to understand the changes you made and why you made them. This is a good resource on how to write good commit messages.

We use Conventional Commits for our commit messages. This allows us to automatically generate a changelog and release notes.

warning

Do not mark your commits as breaking changes. This is not appropriate for a non-library repository such as this mono-repository.

Jira Integration​

Our internal Jira platform is integrated with GitHub.

When working from a Jira ticket, the ticket number can be appended/prepended to a commit message in order to automatically link the respective builds to the ticket. This also includes the PR title for when merging to another branch.

Ensure it is in the correct format including the dash, e.g. ABC-1234.

Git workflow​

We use the GitHub flow for our Git workflow. This means that we use feature branches and pull requests to manage changes to the codebase.

This creates a git graph that looks like this: