Skip to content

This repository contains a CLI written in Rust to create git messages and pull requets based on JIRA ticket and the diff of each commit.

Notifications You must be signed in to change notification settings

compiled-thoughts/git-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 git-ai

The git-ai generates commit messages and pull requests automatically based on your tasks and file changes.

This project is a CLI developed in Rust which can be called using git-ai cli to generate your commit messages based on code changes and a ticket / task.

[TODO] Adicionar gif

Installation

You can install it using a binary file from here or install as a package of your language:

[TODO] For each language

Start the configuration

  1. It will create a local configuration file
git-ai initiate
  1. Declare these envinroment varibles:
# If you are using JIRA
GA_JIRA_API_KEY=<you can get it here: https://id.atlassian.com/manage-profile/security/api-tokens>
GA_JIRA_USER=<your user to sign in into jira>

# If you are using OPENAI
GA_OPENAI_TOKEN=<you can get it here: https://platform.openai.com/api-keys>

Example unix:

export GA_JIRA_USER="copiled@gmail.com"  
export GA_JIRA_TOKEN="ITH0AOKENTIJAR"  
export GA_OPENAI_TOKEN="sk-ODIAjsoid"

Example windows:

$Env:GA_JIRA_USER="copiled@gmail.com"  
$Env:GA_JIRA_TOKEN="ITH0AOKENTIJAR"  
$Env:GA_OPENAI_TOKEN="sk-ODIAjsoid"

Usage

git-ai generate [ticket-id]

or if you prefer using interactive mode:

git-ai generate -i

Available Options

Command Description Arguments
generate or -g Generates a message with predefined arguments (ticket-id or -t), (interactive or -i)
(WIP) create or -c Creates a pull request with predefined arguments (ticket-id or -t), (interactive or -i)
initiate or -i Initializes the configuration none
git-ai --help  

A CLI to generate your git messages!

Usage: git-ai [COMMAND]

Commands:
  generate, -g, --generate  Generates a message with predefined arguments
  initiate, -i, --initiate  Initializes the configuration
  help                      Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

About

This repository contains a CLI written in Rust to create git messages and pull requets based on JIRA ticket and the diff of each commit.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages