@aabdelnasser/commit-cli
command line tool to help in formating commit message with the related ticket number
Last updated 3 months ago by aabdelnasser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @aabdelnasser/commit-cli -g
SYNC missed versions from official npm registry.

Link daily commits with your issue tracking system simply ✨

Using commit-cli will allow you to easily create a new branches using the issue ID you are working on and also to add this ID to your commit messages automatically.

Creating New branch

Commit Messages

Installation

npm i -g @aabdelnasser/commit-cli

Then add .commit-cli.config.json in the root directory of your project

Currently commit-cli support Gitlab Issues and Atlassian Jira but you can support any other issue tracking system in a PR

.commit-cli.config.json for Gitlab integration

{
  "ticketIdExtractorRe": "#\\d*",
  "ticketIdFormatter": "#__COMMIT_CLI_TICKET_ID__",
  "usedService": "gitlab",
  "gitlab": {
    "apiToken": "******************",
    "project": "AAbdelnasser/commit-cli",
    "searchQueries": [
      "scope=all&state=opened&labels=in%20progress&assignee_username[]=AAbdelnasser",
      "scope=all&state=opened&labels=review&assignee_username[]=AAbdelnasser"
    ]
  }
}

.commit-cli.config.json for Atlassian Jira integration

{
  "ticketIdExtractorRe": "EX-\\d+",
  "ticketIdFormatter": "__COMMIT_CLI_TICKET_ID__",
  "usedService": "jira",
  "jira": {
    "url": "https://my-domain.atlassian.net",
    "email": "aabdelnasser@sigmaproit.com",
    "apiToken": "********************",
    "ticketsJql": "project = EX AND status in (\"In Progress\", Review) AND assignee in (abdalla.abdelnasser)"
  }
}

Usage

for creating new branch

commit-cli b branch-name

then your issues will be loaded, so you can select which issue related to this branch.

to commit

commit-cli c "your-commit-message"

you can use the latest issue ID from your previous commit directly, or you type N (No) then your issues will be loaded, so you can select which issue related to this commit.

Current Tags

  • 3.0.2                                ...           latest (3 months ago)

7 Versions

  • 3.0.2                                ...           3 months ago
  • 3.0.1                                ...           7 months ago
  • 3.0.0                                ...           7 months ago
  • 2.0.0                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 7
Last Month 23
Dependencies (6)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |