Gitflow Workflow is used for contributors within the Github organization virtualeconomy. Please check out a new feature branch based on develop
branch and create PR targeting the develop
branch. The repository maintainer will merge develop
branch into main
branch by creating a release regularly.
Forking Workflow is used for contributors outside the Github organization virtualeconomy. Please work on a forked repo and create a PR from the forked repo to the develop
branch of the main repo.
The development requires the latest LTS of Node.js. Dependencies for development will be managed by npm.
To set up the development environment, go to the project root directory and
-
Install dependencies
npm install
-
Install Git hooks with pre-commit so that the fommatter will be invoked whenever a commit is created.
pre-commit install
This project comes with a Github Action workflow script to automatically run test cases on a new git push to the develop
& main
branch .
Ensure to add required repository secrets as per the Github Action workflow script when enabling for Github Action to work properly.
It is specified in the Prettier config file.
We use a simplified version of Angular Commit style.
<type>: <short summary>
│ │
│ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│
└─⫸ Commit Type: build|docs|feat|fix|refactor|test|chore
Commit Type must be one of the following:
- build: Changes that relate to dependencies, CI, release, etc
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- refactor: A code change that neither fixes a bug nor adds a feature
- test: Adding missing tests or correcting existing tests
- chore: Other trivial changes
A branch and the PR comes from it should be small(i.e. contains small-scale changes for only 1 aspect).
The naming convention for branch
type/short-summary-in-lower-case
│ │
│ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│
└─⫸ Commit Type: build|docs|feat|fix|refactor|test|chore
The naming convention for PR
type: short summary in lower case
│ │
│ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│
└─⫸ Commit Type: build|docs|feat|fix|refactor|test|chore
For example, say we would like to add the branch naming convention to the documentation. The branch name should look like
docs/add-branch-naming-convention
The PR should look like
docs: add branch naming convention
The naming convention for Github issues conforms to the PR one.
type: short summary in lower case
│ │
│ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│
└─⫸ Commit Type: build|docs|feat|fix|refactor|test|chore
For example, to suggest adding test cases, the issue name should look like
test: add test cases for XXX
To file a bug, the issue name should look like
fix: XXX is incorrect
jsdoc is used as the standard.