Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

OwlTing/cz

Open more actions menu

Repository files navigation

create commit

Coverage Tests

create commit in human way.

Install

# npm
npm install -g OwlTing/cz

# yarn
yarn global add OwlTing/cz

# pnpm
pnpm install -g OwlTing/cz

# bun
bun install -g OwlTing/cz

Add export PATH="$(yarn global bin):$PATH" to your ~./zshrc if you installed it by yarn global

Development

Running Tests

# Run tests in watch mode
pnpm test

# Run tests once
pnpm test:run

# Run tests with coverage
pnpm test:coverage

# Generate coverage badge
pnpm coverage:badge

Pre-commit Hooks

This project uses lefthook for pre-commit hooks that automatically run:

  • Unit tests (pnpm test:run)
  • TypeScript compilation check (pnpm build)

Update version

# npm
npm update -g owlting_cz

# yarn
yarn global upgrade owlting_cz

# pnpm
pnpm update -g owlting_cz

# bun
bun update -g owlting_cz

Uninstall

# npm
npm uninstall -g owlting_cz

# yarn
yarn global remove owlting_cz

# pnpm
pnpm uninstall -g owlting_cz

# bun
bun remove -g owlting_cz

Commands

cz [Options]
Options:
      --version  Show version number
  -i, --init     Set default project prefix.
  -w, --where    Show config file path.
      --help     Show help

Usage

preset default prefix

support OwlPay and OwlNest currently

cz -i

image

Step 1

pick a commit type

cz

image

Step 2

commit message

image

Step 3

if need to tag Jira issue for title prefix

image

Step 4 (if Step3)

use default prefix

image

or select another project

image

Step 5 (if Step3)

input Jira issue ID

image

Types

{
  name: 'chore',
  emoji: '🧹',
  description: 'Build process or auxiliary tool changes',
  value: 'chore'
},
{
  name: 'ci',
  emoji: '👷',
  description: 'CI related changes',
  value: 'ci'
},
{
  name: 'docs',
  emoji: '📝',
  description: 'Documentation only changes',
  value: 'docs'
},
{
  name: 'feat',
  emoji: '💡',
  description: 'A new feature',
  value: 'feat'
},
{
  name: 'fix',
  emoji: '🐛',
  description: 'A bug fix',
  value: 'fix'
},
{
  name: 'hotfix',
  emoji: '🚨',
  description: 'Emergency fix',
  value: 'hotfix'
},
{
  name: 'perf',
  emoji: '⚡',
  description: 'A code change that improves performance',
  value: 'perf'
},
{
  name: 'refactor',
  emoji: '🔨',
  description: 'A code change that neither fixes a bug or adds a feature',
  value: 'refactor'
},
{
  name: 'release',
  emoji: '🎉',
  description: 'Create a release commit',
  value: 'release'
},
{
  name: 'style',
  emoji: '🎨',
  description: 'Markup, white-space, formatting, missing semi-colons...',
  value: 'style'
},
{
  name: 'test',
  emoji: '🎮',
  description: 'Adding missing tests',
  value: 'test'
},
{
  name: 'storybook',
  emoji: '📚',
  description: 'New storybook',
  value: 'storybook'
},
{
  name: 'revert',
  emoji: '🔙',
  description: 'Revert a commit',
  value: 'revert'
}

Inspired by cz-cli

Todo

  • adapt for other projects prefix
  • unit test
  • CLI

About

create commit in human way.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Morty Proxy This is a proxified and sanitized view of the page, visit original site.