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:
- Always includes the parent message (the one you linked)
- Fetches up to
depthreplies - Chronologically ordered in the AI prompt
Rate Limiting
Slack’s API has rate limits. For large thread depths:
- The CLI handles pagination automatically
- If rate limited, it waits and retries
Step 3: AI Analysis
The collected thread text is sent to your configured AI provider. The AI:
- Understands context: Reads the full conversation
- Extracts key information: Identifies what’s broken, expected behavior, steps
- Generates structure: Creates title, summary, and optional fields
- Strips Slack artifacts: Removes @mentions, reactions, emoji
Generated Fields
| Field | Description | Max Length |
|---|---|---|
title | Short, descriptive issue title | 80 chars |
summary | 1-3 sentence overview | - |
steps_to_reproduce | Numbered reproduction steps | - |
expected_behavior | What should happen | - |
actual_behavior | What 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:
- The CLI scans Slack messages for file attachments
- Downloads images (PNG, JPG, GIF)
- Uploads them to the GitHub repository
- 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):
- The issue is created
- Then added to the specified GitHub Project v2
- 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:
- Title: AI-generated or CLI-provided
- Body: Structured markdown with summary, steps, behavior
- Labels: Applied from all sources
- Assignees: Not set (controlled by your team)
- Projects: If configured
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:
- Parsed Slack thread content
- AI-generated output (before validation)
- Labels that would be applied
- Repository/project targets
This is perfect for:
- Testing AI prompt quality
- Verifying label configuration
- Checking thread parsing
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
| Error | Cause | Solution |
|---|---|---|
| ”Thread not found” | Invalid URL or message ID | Verify the Slack URL |
| ”Bot not in channel” | Missing Slack invite | Run /invite @slack-ticket |
| ”Repository not found” | Wrong owner/repo | Check slack-ticket config view |
| ”Permission denied” | Missing GitHub scopes | Ensure 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
- Typical run time: 3-8 seconds
- Factors: Thread depth, network latency, AI response time
- Slow? Try:
- Smaller
--depthvalues - Faster AI models (e.g.,
gpt-4o-mini) - Increase
ai.timeoutMsif timeout errors occur
- Smaller
Next Steps
- Learn about CLI commands
- Explore AI analysis