New to open source? You can learn how from this free series: How to Contribute to an Open Source Project on GitHub.
- Fork the repo and create your branch from
develop
(a guide on how to fork a repository). - Being in the root directory, run
npm i
and thenlerna bootstrap
, to setup the development environment. - Check out desktop and mobile README.md for more instructions.
Prefix commit messages with one of the following to signify the kind of change:
fix:
bug fixes, e.g. fix incorrect error message.feat:
new features, e.g. add useful API.refactor:
code/structure refactor, e.g. new folder structure.docs:
changes into documentation, e.g. add usage example for getByText.test:
adding or updating tests, eg unit, snapshot testing.chore:
tooling changes, e.g. change circle ci config.BREAKING:
for changes that break existing usage, e.g. change API.
Commit message should be followed by the issue number, eg.
fix: typo #2002
- Navigate to git repository in your terminal.
- Go to the .git/hooks directory:
cd .git/hooks
- Create (or edit if it already exists) the commit-msg file
- Make the file executable:
chmod +x commit-msg
- Edit the commit-msg file and paste the following shell script:
#!/bin/bash
COMMIT_MSG_FILE=$1
COMMIT_MSG=$(cat $COMMIT_MSG_FILE)
if ! echo "$COMMIT_MSG" | grep -E '^(fix:|feat:|refactor:|docs:|test:|chore:|BREAKING:|Publish)' > /dev/null; then
echo "error: invalid commit message format"
echo "Valid formats are fix: feat: refactor: docs: test: chore: BREAKING:"
exit 1
fi