Skip to content

Latest commit

 

History

History
81 lines (65 loc) · 2.63 KB

CONTRIBUTING.md

File metadata and controls

81 lines (65 loc) · 2.63 KB

General instructions

Setting Up a Local Copy

  1. Clone the repo with git clone https://github.com/findify/findify-js
  2. Run yarn in the root findify-js folder.

Once it is done, you can start working on the project.

Workflow

  • Create a topic branch from where you want to base your work. This is usually develop.
  • Make commits of logical units.
  • Write good commit messages (see below).
  • Push your changes to a topic branch in your fork of the repository.
  • Submit a pull request
  • If its not a hotfix or something urgent wait for at least one approval from the codeowners

Tag all merged pull requests that go into the release with the relevant milestone. Each merged PR should also be labeled with one of the labels named tag: ... to indicate what kind of change it is. List of tags in lerna.json should match thouse on GitHub.

When creating a pull request, its comment should reference the corresponding issue id.

We use commitizen.

Use make commit npm run c instead of git commit. Read: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md

Use package name to specify the scope of change. You can use * when the change affects more than a single scope and ^ if its a top-level change or a "chore" related to the monorepo setup.

  • Commits of type fix will trigger bugfix releases, think 0.0.1
  • Commits of type feat will trigger feature releases, think 0.1.0
  • Commits with BREAKING CHANGE in body or footer will trigger breaking releases, think 1.0.0

All other commit types will trigger no new release.

Commits that have [ci skip] or [skip ci] anywhere in the commit messages are ignored by Travis CI.

Git branch naming conventions:

  • master
  • develop
  • feature/something
  • bugfix/something
  • hotfix/something
  • chore/something
  • refactoring/something

Flows:

Install dependencies

[yarn install] > install packages in workspace
|-[postinstall hook] > build libs from packages

Commit

[git add] > add changes to stage
[make commit / yarn c] > start commit stage
|-[commitizen] > run commit prompter
| |-[changelog-plugin] > generate commit message
|-[precommit hook]
| |-[lerna test] > test changed packages
| |-[husky pre-commit] > lint staged files
| | |-[git add] > all fixes to commit
[git push]

Publish

[lerna publish] > run lerna publisher
|-[conventional commit plugin] > parse commits
|-[lerna diff] > find changed packages
|-[lerna version] > bump versions
|-[lerna changelog] > generate changelog
|-[npm publish] > publish packages to npm
|-[git commit] > commit and push changelog