Skip to content

cds-id/jira-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jira Tools - Git Commit Automation

From Developer to Developer: Streamlining Your Jira-Git Workflow

A CLI tool that integrates Jira with Git commits, automatically fetching issue summaries and creating semantic commit messages with Git Flow support.

Roadmap

Existing Features

  • Fetch Jira issue details directly from the command line
  • Automatically create semantic commit messages with Jira issue information
  • Lookup detailed Jira issue information
  • Supports custom commit types (feat, fix, chore, etc.)
  • Git Flow branching strategy support
  • Wizard-based configuration setup

Upcoming Features

  • Developer Assistant

    • Smart priority card suggestions
    • Task prioritization recommendations
    • Workload optimization
  • Timetracker

    • Integrated Jira time logging
    • Automated work tracking
    • Time report generation
  • Card Transitions

    • Move cards between states
    • Automated workflow transitions
    • Custom transition rules
  • Issue Reports

    • Remaining issues summary
    • Sprint progress tracking
    • Team velocity metrics

Prerequisites

  • Go 1.16 or higher (only for building from source)
  • Git installed and configured
  • Jira account with API access
  • Jira API token (How to generate)

Installation

From Pre-built Binaries

Download the appropriate binary for your platform:

macOS (Intel):

curl -LO "https://github.com/cds-id/jira-tools/releases/latest/download/jt-darwin-amd64"
chmod +x jt-darwin-amd64
sudo mv jt-darwin-amd64 /usr/local/bin/jt

macOS (Apple Silicon):

curl -LO "https://github.com/cds-id/jira-tools/releases/latest/download/jt-darwin-arm64"
chmod +x jt-darwin-arm64
sudo mv jt-darwin-arm64 /usr/local/bin/jt

Linux (x86_64):

curl -LO "https://github.com/cds-id/jira-tools/releases/latest/download/jt-linux-amd64"
chmod +x jt-linux-amd64
sudo mv jt-linux-amd64 /usr/local/bin/jt

Linux (ARM64):

curl -LO "https://github.com/cds-id/jira-tools/releases/latest/download/jt-linux-arm64"
chmod +x jt-linux-arm64
sudo mv jt-linux-arm64 /usr/local/bin/jt

Windows:

# Download jt-windows-amd64.exe
# Rename to jt.exe
# Add to PATH or move to a directory in your PATH

From Source

  1. Clone the repository:
git clone https://github.com/cds-id/jira-tools.git
cd jira-tools
  1. Install dependencies:
go mod tidy
  1. Build the binary:
go build -o jt ./cmd/jt
  1. (Optional) Move to PATH for system-wide access:
sudo mv jt /usr/local/bin/

Configuration

Run the setup wizard:

jt setup

The wizard will guide you through:

  1. Jira Configuration

    • Domain
    • Email
    • API Token
  2. Git Branch Configuration

    • Single Branch (Development only)
      • Select your development branch
    • Git Flow Setup (Production/Development)
      • Select production branch (main/master)
      • Select development branch (develop)

Usage

Look up Jira Issue Details

jt lookup PROJ-123

This will display:

  • Issue Key
  • Summary
  • Status
  • Assignee
  • Description

Branch Management

Create a new branch based on Jira issue:

jt branch PROJ-123 feature    # Creates feature/PROJ-123-issue-summary
jt branch PROJ-123 bugfix     # Creates bugfix/PROJ-123-issue-summary
jt branch PROJ-123 hotfix     # Creates hotfix/PROJ-123-issue-summary

Create a Commit

jt commit PROJ-123 feat       # feat(PROJ-123): Issue summary

Push Changes

Push current branch to remote:

jt push

Branch Types

  • feature - New feature branch (from development)
  • bugfix - Bug fix branch (from development)
  • hotfix - Hot fix branch (from production)
  • release - Release branch (from production)

Commit Types

  • feat: New feature
  • fix: Bug fix
  • chore: Maintenance tasks
  • docs: Documentation changes
  • style: Code style changes
  • refactor: Code refactoring
  • test: Adding or modifying tests

Example Output

# Looking up issue
$ jt lookup PROJ-123
Issue Details:
Key: PROJ-123
Summary: Implement user authentication
Status: In Progress
Assignee: John Doe
Description:
Add user authentication using OAuth2...

# Creating a branch
$ jt branch PROJ-123 feature
Created branch feature/PROJ-123-implement-user-authentication from develop

# Creating a commit
$ jt commit PROJ-123 feat
Changes committed with message:
feat(PROJ-123): Implement user authentication

# Pushing changes
$ jt push
Successfully pushed branch feature/PROJ-123-implement-user-authentication to remote

Development

Project Structure

jira-tools/
├── cmd/
│   └── jt/
│       └── main.go
├── internal/
│   ├── config/
│   │   └── config.go
│   ├── git/
│   │   └── git.go
│   └── jira/
│       └── jira.go
├── .env
├── go.mod
├── go.sum
├── .gitignore
└── README.md

Building from Source

  1. Clone the repository
git clone https://github.com/cds-id/jira-tools.git
  1. Navigate to the project directory
cd jira-tools
  1. Install dependencies
go mod tidy
  1. Build the binary
go build -o jt ./cmd/jt

Running Tests

go test -v ./...

GitHub Actions

The project includes a GitHub Actions workflow for:

  • Building the application for multiple platforms (Linux, Windows, macOS)
  • Creating releases when tags are pushed
  • Automated builds and tests

To create a release:

  1. Tag your version
git tag v1.0.0
git push origin v1.0.0

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Security

  • Never commit your .env file
  • Keep your Jira API token secure
  • Consider using GitHub Secrets for CI/CD
  • Credentials are stored securely in user's home directory

Troubleshooting

Common Issues

  1. Authentication Error

    • Run jt setup to reconfigure credentials
    • Check if your API token is valid
    • Verify credentials in ~/.jira-tools/.env
  2. Command Not Found

    • Ensure the binary is in your PATH
    • Verify the binary has execute permissions
    • Run which jt to locate the binary
  3. Branch Creation Issues

    • Ensure you're in a git repository
    • Check if the base branch exists
    • Verify your git flow configuration

For more issues, please check the GitHub Issues section.

About

A CLI tool that integrates Jira with Git commits, automatically fetching issue summaries and creating semantic commit messages with Git Flow support.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages