Skip to content

IzhanAli/jcommit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jcommit

jcommit integrates Jira-Git for your work automating branch & Jira ticket creation and preventing protected-branch commits to help you commit faster with confidence.

  • Helps you through seamless branch creation so that your work stays on top of latest changes.

  • Eliminates manual Jira work item creation by either:

      - Shows open work items based on your email or assignee so that you can use existing work item summary to keep your commit message consistent with the work item
      - Automatic work item creation with assignee and mentioning the work item key in your commit message
    

Built in TypeScript and designed to keep your accelerate code-push flow and consistent.

Use only if you want your commits to be linked to Jira issues.

Why it's faster:

  • Jira integration: Uses Jira API to create & assign or fetch issues and include ticket ID in commit messages.
  • Branch safety: Prevent commits to protected branches.
  • Remote sync with upstream: Make your work sit on top, so it eliminates merging
  • Push after commit: Never forget creating PR again

Install

npm install -g jcommit

Configuration

By default, config is stored at ~/.jcommit.json. Override with:

JCOMMIT_CONFIG=/path/to/config.json jcommit setup

Required configuration fields (references attached):

  • jiraURL: Your Jira domain (e.g., company.atlassian.net)

  • jiraEmail: Your Jira email

  • jiraApiToken: Create Jira API token and add

  • jiraProjectId: Your Jira project ID

  • jiraIssueTypeId: Default issue type ID

Optional fields:

  • jiraAssigneeId: Your Jira account ID for assigning
  • protectedBranches: Array of protected branch names (default: ["master"])

Quick Start

jcommit setup

Usage

jcommit

Optional flags:

jcommit --config /path/to/config.json

jcommit --help

jcommit --version

Examples

Push your work tied to an issue and commit:

jcommit

Run with a custom config location:

jcommit --config ./config/jcommit.json

Development

Integrate and customize according to your needs

Prerequisites

  • Node.js >= 18.16.1

  • npm

Setup

npm install

Build

npm run build

Development Mode

npm run dev

Local Install (from repo)

npm install -g .

Project Structure


src/

├── types.ts # TypeScript type definitions

├── index.ts # Main entry point

├── cli/

│ └── args.ts # CLI argument parsing

├── config/

│ └── config.ts # Configuration management

├── services/

│ └── jira.ts # Jira API service

├── utils/

│ ├── colors.ts # Console color utilities

│ ├── git.ts # Git command utilities

│ └── prompts.ts # Interactive prompt utilities

└── workflow/

└── main.ts # Main workflow logic

About

a CLI tool which integrates Jira-Git seamlessly

Topics

Resources

License

Stars

Watchers

Forks

Contributors