Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 62 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ Stop manually copying tasks from code reviews into Linear. Just comment `/create
- 🏷️ **Intelligent Labels** - AI receives Linear's available labels for accurate suggestions, automatic tagging
- 🔄 **Duplicate Detection** - Tracks processed comments to prevent creating duplicate issues on multiple runs
- 🔍 **Automatic Comment Gathering** - Fetches and analyzes all unresolved PR comments in one operation
- 🖥️ **Interactive TUI** - Terminal interface for browsing, selecting, and editing issues before creation

## Quick Start

### Option 1: Automatic Setup (Recommended)

Clone this repo into your project and run the interactive setup:

```bash
```zsh
cd your-project
git clone https://github.com/paperdiamond/gitlin.git .gitlin
cd .gitlin
Expand Down Expand Up @@ -73,7 +74,61 @@ Go to your repository's Settings → Secrets → Actions and add:
- `LINEAR_TEAM_ID` - Your Linear team UUID (get it by running `node scripts/get-team-id.js` in the gitlin directory)
- `ANTHROPIC_API_KEY` - Get from https://console.anthropic.com/

### Use It!
### Interactive TUI Mode

For a more hands-on experience, use the interactive Terminal User Interface:

```zsh
cd .gitlin
pnpm tui
```

**Requirements:** The TUI requires a `.env` file with your API keys:
```zsh
cp .env.example .env
# Edit .env and add your LINEAR_API_KEY, LINEAR_TEAM_ID, and ANTHROPIC_API_KEY
```

#### TUI Workflow

1. **Select Repository** - Auto-detects current repo from git, or choose from your recent GitHub repos
2. **Select PR** - Browse open PRs or enter a PR number manually
3. **Select Comments** - View all unresolved comments, with existing Linear tickets marked (🎫)
4. **AI Analysis** - Claude parses selected comments and extracts actionable issues
5. **Review & Edit** - Toggle issues on/off, edit title/description/priority/effort/labels
6. **Confirm & Create** - Preview final issues before creating them in Linear
7. **Results** - See created issues with direct links to Linear

#### TUI Features

- 📂 **Smart Repo Detection** - Auto-detects current repo from git remote
- 📋 **PR Browser** - Lists open PRs with author info, or enter PR # manually
- 🎫 **Duplicate Detection** - Comments with existing Linear tickets are marked
- ✏️ **Full Issue Editor** - Edit all fields: title, description, priority, effort, labels
- 🏷️ **Label Picker** - Multi-select from your Linear team's available labels
- ☑️ **Selective Creation** - Toggle individual issues on/off before creating

#### Keyboard Shortcuts

| Screen | Key | Action |
|--------|-----|--------|
| All | `↑/↓` or `j/k` | Navigate up/down |
| All | `Esc` | Go back to previous screen |
| All | `q` | Quit (except when editing) |
| All | `Ctrl+C` | Force quit |
| Comments | `Space` | Toggle comment selection |
| Comments | `a` | Select all comments |
| Comments | `n` | Deselect all comments |
| Comments | `Enter` | Continue to AI analysis |
| Issues | `Space` or `t` | Toggle issue enabled/disabled |
| Issues | `Enter` or `e` | Edit selected issue |
| Issues | `c` | Continue to confirmation |
| Editor | `Enter` or `e` | Edit current field |
| Editor | `s` | Save and return |
| Results | `r` | Create more issues (restart) |
| Error | `r` | Retry from beginning |

### Use It (GitHub Action)

Comment `/create-issues` on any PR or issue, and the bot will:
1. **Automatically fetch all unresolved comments** on the PR (both issue comments and review comments)
Expand Down Expand Up @@ -196,7 +251,7 @@ Create `.github/gitlin.json` to customize behavior:

### Setup

```bash
```zsh
git clone https://github.com/yourusername/gitlin.git
cd gitlin
pnpm install
Expand All @@ -205,13 +260,13 @@ cp .env.example .env # Add your API keys

### Run Locally

```bash
```zsh
pnpm run dev
```

### Test

```bash
```zsh
pnpm test # Run tests once
pnpm test:watch # Run tests in watch mode
pnpm lint # Check for lint errors
Expand All @@ -222,7 +277,7 @@ pnpm format:check # Check formatting

### Build

```bash
```zsh
pnpm run build
```

Expand Down Expand Up @@ -287,14 +342,13 @@ This pays for itself immediately by saving 5-10 minutes per code review.
- [x] Duplicate detection (tracks processed comments)
- [x] Automatic comment gathering (fetches all unresolved PR comments)
- [x] Conservative priority assignment (prevents over-prioritization)
- [x] Interactive TUI for manual issue selection

### Planned
- [ ] Interactive TUI for manual comment selection
- [ ] Sub-issue hierarchy support
- [ ] Support for multiple Linear teams
- [ ] Slack integration
- [ ] Custom AI models (GPT-4, local models)
- [ ] Batch issue editing before creation
- [ ] Integration with GitHub Projects

## Contributing
Expand Down
Loading