https://github.com/jerridan/jitter
A tool that generates a git branch given a Jira ticket number
https://github.com/jerridan/jitter
Last synced: 25 days ago
JSON representation
A tool that generates a git branch given a Jira ticket number
- Host: GitHub
- URL: https://github.com/jerridan/jitter
- Owner: jerridan
- Created: 2023-11-23T19:28:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-26T21:33:32.000Z (over 1 year ago)
- Last Synced: 2025-02-17T06:45:17.643Z (4 months ago)
- Language: Python
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jitter
A tool that generates a git branch given a jira ticket number.
## Pre-requisites
- Python 3.8 or newer. You can check your Python version using `python --version`. Consider using pyenv to manage and
install different python versions.
- Poetry for Python package and environment management. Follow the directions [here](https://python-poetry.org/docs/)
for installation instructions.## Installation Steps
1. Clone the Github repository
```bash
git clone https://github.com/jerridan/jitter
cd jitter
```2. Install the dependencies in a virtual environment using Poetry
```bash
make init
```3. Package the script into an executable using Pyinstaller
```bash
make build
```4. Add the resulting executable (located in `dist` folder) to your PATH
```bash
echo 'export PATH="$PATH:/absolute/path/to/jitter/dist"' >> ~/.zshrc # or ~/.bashrc if you use bash
source ~/.zshrc
```## Configuration
To use the Jitter Python script, you need to set up a YAML configuration file named .jitter.yml in your home directory.
It requires your Jira configuration details including username and API token.Follow these steps:
### Step 1: Obtain your Jira API token.
You can generate a new API token from
your [Atlassian account settings](https://id.atlassian.com/manage-profile/security), under Security > API tokens.### Step 2: - Create .jitter.yml file in your home directory.
You can do this by running the following command in your terminal:
`touch ~/.jitter.yml`
### Step 3: - Open ~/.jitter.yml in a text editor and add your Jira configuration inside it.
The file should have the following format:
```yaml
jira:
url: your_jira_url # ex. https://example.atlassian.net
username: your_jira_username
token: your_jira_token
```Replace your_jira_url, your_jira_username, and your_jira_token with your actual Jira details.
Note: Treat your API tokens like passwords and keep them secret. API tokens link to your Atlassian account until you
revoke them.## Usage
After installing the Jitter project, from any directory just run:
`jitter [ticket number]`
This will create a new branch using the summary. Replace `[ticket number]` with your specific Jira ticket number.
For example, if your Jira ticket number is `ADA-1234`, run: `jitter ADA-1234`
If the ticket summary is `Add a new feature`, the branch name will be `ADA-1234-add-a-new-feature`.
Happy Coding!