Issue Creation Feature

The create command is the heart of slack-ticket. This document provides a detailed walkthrough of what happens when you convert a Slack thread to a GitHub issue.

The Creation Pipeline

When you run slack-ticket create <url>, the following happens:

1. URL Parsing     → Extract channel and message IDs
2. Thread Fetch   → Retrieve messages from Slack API
3. AI Analysis    → Generate structured issue content
4. Labeling       → Apply severity, component, keyword labels
5. Image Handling → Download and attach images (optional)
6. Project Assignment → Add to GitHub Project (optional)
7. Issue Creation → POST to GitHub API

Step 1: URL Parsing

The CLI extracts the Slack channel ID and message timestamp from your URL:

https://yourworkspace.slack.com/archives/C12345909012345678/p1679
                                        ^^^^^^^^ ^^^^^^^^^^^^^^^
                                        channel   message ID

This identifies exactly which thread to fetch.


Step 2: Thread Fetching

The depth option controls how many messages are retrieved:

slack-ticket create <url> --depth 3  # Default
slack-ticket create <url> --depth 10 # Maximum

Behavior:

Rate Limiting

Slack’s API has rate limits. For large thread depths:


Step 3: AI Analysis

The collected thread text is sent to your configured AI provider. The AI:

  1. Understands context: Reads the full conversation
  2. Extracts key information: Identifies what’s broken, expected behavior, steps
  3. Generates structure: Creates title, summary, and optional fields
  4. Strips Slack artifacts: Removes @mentions, reactions, emoji

Generated Fields

FieldDescriptionMax Length
titleShort, descriptive issue title80 chars
summary1-3 sentence overview-
steps_to_reproduceNumbered reproduction steps-
expected_behaviorWhat should happen-
actual_behaviorWhat actually happens-

Step 4: Labeling

slack-ticket applies labels automatically based on your configuration:

Severity Labels

Set via CLI flag:

slack-ticket create <url> --severity critical

Or infer from keywords in your config.

Component Labels

slack-ticket create <url> --component frontend

Matches against keys in config.labels.components.

Keyword Labels

Automatically matches words in the conversation:

{
  "labels": {
    "keywords": {
      "bug": ["broken", "fail", "crash"],
      "security": ["vulnerability", "exploit", "breach"]
    }
  }
}

Step 5: Image Handling

If --no-image is not specified:

  1. The CLI scans Slack messages for file attachments
  2. Downloads images (PNG, JPG, GIF)
  3. Uploads them to the GitHub repository
  4. Embeds them in the issue body

This preserves visual context like error screenshots.


Step 6: GitHub Project Assignment

If configured (via defaultProject or --project flag):

  1. The issue is created
  2. Then added to the specified GitHub Project v2
  3. Optionally added to a specific column/status

Use --no-project to skip for a specific run.


Step 7: Issue Creation

The final POST to GitHub includes:

GitHub Issue Template

## Summary

<!-- AI-generated 1-3 sentence description -->

## Steps to Reproduce

<!-- If inferable from conversation -->

## Expected Behavior

<!-- What should happen -->

## Actual Behavior

<!-- What actually happens -->

---

_Created from Slack thread: <url>_

Preview Mode (Dry Run)

Use --dry-run to see what would be created without actually creating it:

slack-ticket create <url> --dry-run

Output includes:

This is perfect for:


Confirmation Mode

By default, slack-ticket shows a preview and asks for confirmation:

✓ Fetched 3 messages from Slack thread
✓ AI analysis complete

Title: Login fails with session timeout
Summary: Users experience immediate session timeout...
Labels: bug, auth, high

Create this issue in your-org/your-repo? (y/N)

Skip with --yes for automation.


Error Handling

Common Issues

ErrorCauseSolution
”Thread not found”Invalid URL or message IDVerify the Slack URL
”Bot not in channel”Missing Slack inviteRun /invite @slack-ticket
”Repository not found”Wrong owner/repoCheck slack-ticket config view
”Permission denied”Missing GitHub scopesEnsure repo scope

Debug Mode

For troubleshooting, check with:

slack-ticket doctor

This validates all connections and permissions.


Advanced Usage

Override Repository Per-Issue

# Create in a different repo than default
slack-ticket create <url> --repo other-org/other-repo

Skip Project for Specific Issues

# Don't add to project for this issue
slack-ticket create <url> --no-project

Custom Labels Per-Issue

# Add additional labels
slack-ticket create <url> --labels "customer-facing,needs-triage"

Performance


Next Steps