Skip to content

v1.1.1 - GitHub Integration

Choose a tag to compare

@Thomo1318 Thomo1318 released this 05 Dec 10:04
· 63 commits to main since this release
459d9ec

v1.1.1 - GitHub Integration

🎉 What's New

GitHub CLI Integration with Interactive Prompts

Streamlined GitHub repository management directly from jj with three new commands:

  • jj gh-create - Create GitHub repositories interactively
  • jj init-github - Initialize jj repo and create GitHub repo (all-in-one)
  • jj gh-clone - Clone GitHub repos and initialize with jj

✨ Key Features

Smart & Dynamic

  • Dynamic username detection - No hardcoded usernames, works for any authenticated user
  • Auto-description generation - Intelligently extracts descriptions from README.md, package.json, pyproject.toml, or Cargo.toml
  • Interactive prompts - Choose repository visibility (public/private) with confirmation

Robust & Reliable

  • Comprehensive error handling - Validates dependencies (gh, jj, git) and authentication
  • Input validation - Ensures repository names follow GitHub conventions
  • Colored output - Clear visual feedback with info, success, warning, and error messages

Maintainable & Extensible

  • External script approach - Separate gh-helper.sh script for easy editing and testing
  • Modular design - Clean functions following bash best practices
  • Well documented - Comprehensive inline comments and separate README

📦 Installation

# Scripts are already in ~/.config/jj/scripts/ (via symlink)
# Just ensure GitHub CLI is authenticated
gh auth login

# Test the new commands
jj gh-create --help

🎨 Usage

# Create a new GitHub repo (interactive)
jj gh-create

# Initialize jj repo and create GitHub repo (all-in-one)
jj init-github

# Clone and initialize with jj
jj gh-clone owner/repo

📊 Improvements

This implementation uses an external script approach instead of inline bash for:

  • ✅ Better error handling and validation
  • ✅ Dynamic username detection (no hardcoding)
  • ✅ Multi-source description generation
  • ✅ Easier testing and maintenance
  • ✅ Better user experience with colors and confirmations

🔗 Files Added/Modified

New Files

  • scripts/gh-helper.sh - Main helper script
  • scripts/README.md - Scripts documentation
  • IMPLEMENTATION.md - Implementation details

Modified Files

  • config.toml - Added gh-create, init-github, gh-clone aliases
  • TASKS.md - Marked TODO 4 as implemented

🚀 Future Enhancements

  • v1.2.0-security: Automatic commit signing
  • v2.0: GitHub CLI extension
  • v3.0: Task runner integration for CI/CD

📚 References


Full Changelog: v1.1.0...v1.1.1-gh-integration