Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Add commitizen and commitlint #99

Closed
wants to merge 2 commits into from
Closed

Conversation

fathyb
Copy link
Contributor

@fathyb fathyb commented Jul 24, 2018

Follow up to @f2prateek work on #98.

  • use commitizen to help new contributors
  • use commitlint to check that commits are conform to our convention using a commitmsg hook

eca3nxfoe4

@fathyb fathyb requested review from f2prateek, ccnixon and jlee9595 July 24, 2018 22:59
@codecov-io
Copy link

codecov-io commented Jul 24, 2018

Codecov Report

Merging #99 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #99   +/-   ##
=======================================
  Coverage   98.58%   98.58%           
=======================================
  Files          11       11           
  Lines         636      636           
=======================================
  Hits          627      627           
  Misses          9        9

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2ad22c...13d2b5c. Read the comment docs.

@fathyb fathyb force-pushed the chore/commit-convention branch 2 times, most recently from b8dae8c to 1fb74d1 Compare July 30, 2018 03:41
@@ -17,6 +17,8 @@ jobs:
key: yarn-dependency-cache-{{ checksum "yarn.lock" }}
paths:
- node_modules
- run: git fetch origin master
- run: yarn commitlint --from $(git merge-base --fork-point FETCH_HEAD)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do this as part of make test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After testing a bit turns out it can be difficult to find which commits are relevant just using git locally. I switched to using the PR URL and the compare URL in CircleCI env to find out which commit should be checked.

@@ -106,5 +104,23 @@
"sinon": "^1.7.3",
"snyk": "^1.83.0",
"watchify": "^3.7.0"
},
"commitlint": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When/how does this run?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the commitmsg husky hook :

"commitmsg": "commitlint -E GIT_PARAMS"

Or manually : yarn commitlint --from HEAD~2

@fathyb fathyb force-pushed the chore/commit-convention branch from 1fb74d1 to 13d2b5c Compare August 11, 2018 21:30
@f2prateek f2prateek closed this Mar 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants