Skip to content

Commits

Guillem Puche edited this page Oct 24, 2022 · 17 revisions

Commit convention

You'll need to follow the next Set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of.

Every commit should follow the following structure: type(scope): explaination_in_present_tense or type(*): explanation_in_present_tense (the last structure is when there's a cross change of none/multiple packages and multiple contexts)

There are a small list of types (below there's the list) and packages (their names are in the code folder packages).

List of types with examples

  • fix: patches a bug in the codebase.

fix(entities): add the validation for privateKey when creating a new account

  • feat: introduce a new feature to the codebase.

feat(repo): change default branch

feat(ui-components): add a progress button

  • refactor: restructure the code, change the internal behavior of method.

refactor(ui-repositories): split the code on multiple methods for the swap functionality

refactor(*): delete the creation of an instance in the API

refactor(entities): change name of a method getValue

  • improv: an improvement of the code without fixing the code and doing a refactor

improv(test): exclude Javascript files

  • docs: documentation like comments, explanation for classes, methods, etc.

docs(common): add explanation for class Error

docs(*): add the section Contribute

  • chore: periodic management task, like upgrading the dependencies, uploading documentation, etc.
  • ci: edit the debugging flow (eg. VSCode configuration), modify git configuration (eg. the file .gitignore), modify the build process, edit scripts, add new NPM commands, etc.

List of scopes

  • common: anything related to the package Common
  • entities: anything related to the package Entities
  • repositories: anything related to the package Repositories
  • ui-components: anything related to the package containing the frontend components
  • ui-wallet: anything related to the package with the wallet website
  • repo: anything related to managing the repo itself
  • test: anything testing specific (e.g., jest or cypress)
  • *: multiple scopes
Clone this wiki locally