quick-workflow
Streamlined GitHub and Jira workflow automation tools
A collection of CLI tools to automate your daily GitHub PR and Jira workflow, available in both Go and Shell implementations.
💡 Why use it
Are you tired of the hassle of changing the status every time you create a PR, such as ‘code review,’ ‘merged,’ and dealing with repetitive tasks?
Especially when you’re busy and have opened multiple browser windows, waiting for pages to load just to complete these mundane tasks can be time-consuming, diverting our focus from more important matters.
Highlighted Benefits:
- Efficiency: Streamline the process by automating status updates and repetitive tasks.
- Time-Saving: Eliminate the need to open multiple browser tabs and wait for pages to load.
- Enhanced Focus: Allow users to concentrate on more crucial tasks.
- Reduced Manual Work: Minimize the need for manual status updates for each PR.
- Standardized Workflow: Ensures a consistent and error-free process.
🚀 Features
- Automated PR Creation: Create branch, commit, push, and open PR in one command
- Jira Integration: Automatically link PRs to Jira tickets and update status
- Smart Branch Management: Auto-detect default branch (main/master)
- Interactive CLI: User-friendly prompts with support for cancellation (Ctrl+C)
- One-Command Merge: Merge PR, delete branch, and update Jira status
- Browser Integration: Auto-open PR in browser and copy URL to clipboard
📦 Two Implementations
Go Version (Recommended) 🆕
Modern, fast, and cross-platform implementation written in Go.
# Install
cd go-version
make install
# Usage
qkg pr create # Create a PR
qkg pr merge # Merge a PR
qkg init # Initialize configuration
Benefits:
- ✅ Single binary, no dependencies
- ✅ Cross-platform (macOS, Linux, Windows)
- ✅ Fast execution
- ✅ Better error handling
- ✅ Type-safe configuration
👉 Go Version Documentation
Shell Version (Legacy)
Original implementation using shell scripts.
# Installation (one-time setup)
cd quick-workflow/shell-version
./install.sh
# Usage
qk pr create # Create a PR
qk pr merge # Merge a PR
👉 Shell Version Documentation
🎯 Quick Start
Option 1: Go Version (Recommended)
-
Prerequisites:
# Install Go
brew install go
# Install GitHub CLI
brew install gh
gh auth login
# Install Jira CLI (optional)
brew install jira-cli
jira init
-
Install qkg:
cd go-version
make install
-
Configure:
qkg init
# Follow the prompts to set up GitHub token, Jira credentials, etc.
-
Use:
# Stage your changes
git add .
# Create PR with interactive prompts
qkg pr create
# Or with Jira ticket
qkg pr create PROJ-123
Option 2: Shell Version
See shell-version/README.md for installation instructions.
📖 Core Commands
PR Create Workflow
qkg pr create [jira-ticket]
What it does:
- ✅ Prompts for Jira ticket (optional)
- ✅ Fetches Jira issue details if ticket provided
- ✅ Prompts for PR title and description
- ✅ Lets you select change types (feat, fix, docs, etc.)
- ✅ Creates a new branch
- ✅ Stages and commits changes
- ✅ Pushes to remote
- ✅ Creates GitHub PR
- ✅ Links PR to Jira ticket
- ✅ Updates Jira status
- ✅ Copies PR URL to clipboard
- ✅ Opens PR in browser
PR Merge Workflow
qkg pr merge
What it does:
- ✅ Lists your open PRs
- ✅ Lets you select which PR to merge
- ✅ Merges the PR
- ✅ Deletes the remote branch
- ✅ Deletes the local branch
- ✅ Updates Jira status
- ✅ Switches back to default branch
🔧 Configuration
Go Version
Configuration is stored in ~/.config/qk/config.yaml:
github:
token: ghp_xxx
jira:
email: [email protected]
api_token: xxx
server: https://your-domain.atlassian.net
branch_prefix: "ym" # Optional: prefix for branch names
You can also set environment variables:
GITHUB_TOKEN or GH_TOKEN
JIRA_API_TOKEN
JIRA_SERVICE_ADDRESS
GH_BRANCH_PREFIX
Shell Version
Uses environment variables in .zshrc or .bashrc. See shell-version/README.md.
🛠️ Development
Go Version
cd go-version
# Initialize dependencies
make gen
# Format and fix code
make fix
# Run linters
make check
# Run tests
make test
# Development mode (quick run)
make dev ARGS="pr create"
# Build
make build
# Install
make install
See go-version/README.md for more details.
📚 Documentation
🆚 Comparison
| Feature |
Go Version |
Shell Version |
| Installation |
Single binary |
Multiple dependencies |
| Performance |
Fast |
Slower |
| Cross-platform |
✅ Yes |
🔶 Unix-like only |
| Error handling |
✅ Robust |
🔶 Basic |
| Maintenance |
✅ Active |
🔶 Legacy |
| Cancel support |
✅ Ctrl+C anywhere |
❌ Limited |
| Type safety |
✅ Yes |
❌ No |
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
Maintainer: @Wangggym
💡 Tip: Star this repo if you find it useful!
评论