Jira-Flow is a CLI tool designed to link git commits with JIRA issues.
npm install -g jira-flow
To install Jira-Flow from source, including all associated binaries (jiraflow
, commitmsg
, postco
), follow these steps:
-
Clone the repository:
git clone https://github.com/JaleelB/jira-flow.git cd jira-flow
-
Build the project (assuming Go is installed):
go build -o jiraflow ./cmd/jiraflow/main.go go build -o commitmsg ./hooks/commitmsg/main.go go build -o postco ./hooks/postco/main.go
-
Optionally, install the binary to a location in your PATH:
sudo mv jiraflow /usr/local/bin sudo mv commitmsg /usr/local/bin sudo mv postco /usr/local/bin
On Windows, move the
.exe
files to a directory that is included in your PATH.
If you prefer not to use npm, you can manually download the binaries from the GitHub Releases page.
- Navigate to the Releases page of Jira-Flow.
- Download the appropriate binary for your operating system and architecture.
- Extract the downloaded archive and place the binary in a directory included in your system's PATH.
For example, on Unix-like systems:
tar -zxvf jiraflow_vX.X.X_os_arch.tar.gz
sudo mv jiraflow /usr/local/bin
tar -zxvf commitmsg_vX.X.X_os_arch.tar.gz
sudo mv commitmsg /usr/local/bin
tar -zxvf postco_vX.X.X_os_arch.tar.gz
sudo mv postco /usr/local/bin
On Windows, extract the files and add the folder to your PATH using the environment settings.
Once installed, you can use Jira-Flow with the following commands:
# Initialize JiraFlow
jira-flow init
# Check JiraFlow status
jira-flow status
# Toggle JiraFlow on/off
jira-flow status --toggle
-
init
- Initialize JiraFlow in your repositoryjira-flow init
This opens an interactive menu where you can:
- Configure automatic/manual JIRA issue linking
- Check JiraFlow status
- Remove JiraFlow
-
status
- Check JiraFlow configuration statusjira-flow status
Shows whether JiraFlow is active and which hooks are installed.
Use
--toggle
flag to enable/disable JiraFlow:jira-flow status --toggle
When running jira-flow init
, you'll see an interactive menu with these options:
- Configure - Set up JiraFlow for your repository
- Status - Check current JiraFlow status
- Remove - Remove JiraFlow from repository
- Exit - Exit the CLI
Here's a quick example of initializing Jira-Flow and configuring it to automatically detect JIRA issue keys:
$ jira-flow init
# Welcome message and logo displayed
? How would you like to proceed:
▸ Configure Jira-Flow
Remove Jira-Flow
Exit Jira-Flow
# User selects 'Configure Jira-Flow'
? Choose configuration method:
▸ Automatically link commits to Jira issues based on branch name
Manually link commits to Jira issues by entering the Jira issue key
# User chooses 'Automatically'
# Success message confirming automatic linking
"Success! The JIRA issue key will now be prepended to your commits."
Once set up, Jira-Flow will prepend commit messages with the JIRA issue key, either detected from the branch name or entered manually, enhancing the integration between the developer's code repository and the JIRA tracking system.
For more information on how JIRA issue keys can be used to reference issues in your development work, including commits, branches, and pull requests, see the official Atlassian documentation.
- Fork the repository
- Create a branch
git checkout -b fix/amazingFix
- Commit your changes and push to your branch
git commit -m "made an amazingFix" git push origin fix/amazingFix
- Open a pull request
You can check if JiraFlow is active in your repository: