|
1 | 1 | --- |
2 | | -description: Create Jira ticket from Slack thread URL using inst-ai |
| 2 | +description: Create Jira ticket from Slack thread, GitHub issue, or text description |
3 | 3 | --- |
4 | 4 |
|
5 | | -Create a Jira ticket from a Slack conversation using inst-ai tool with InstUI conventions. |
| 5 | +Create a Jira ticket from multiple sources using inst-ai tool with InstUI conventions. |
6 | 6 |
|
7 | 7 | ## Requirements |
8 | 8 |
|
9 | | -- Slack thread URL is required as argument |
| 9 | +- Input source is required as argument: |
| 10 | + - Slack thread URL (e.g., `https://instructure.slack.com/archives/C123/p456`) |
| 11 | + - GitHub issue URL (e.g., `https://github.com/instructure/instructure-ui/issues/123`) |
| 12 | + - Textual description (plain text describing the issue) |
10 | 13 | - inst-ai tool must be installed globally (`npm install -g github:instructure/inst-ai-tool`) |
| 14 | +- GitHub CLI (`gh`) must be installed for GitHub issue fetching |
11 | 15 | - Configuration must be set up (see inst-ai documentation) |
12 | 16 |
|
13 | 17 | ## Process |
14 | 18 |
|
15 | | -1. **Extract Slack conversation**: |
16 | | - - Run `inst-ai slack "<slack-url>" --format xml --include-metadata --include-codesandbox` |
17 | | - - This extracts the conversation in LLM-friendly XML format with full context |
18 | | - |
19 | | -2. **Analyze the conversation**: |
20 | | - - Parse the Slack conversation to identify: |
21 | | - - The core issue or request |
22 | | - - Relevant technical details |
23 | | - - Any mentioned components or file paths |
24 | | - - User expectations and requirements |
25 | | - - Screenshots or CodeSandbox links |
26 | | - |
27 | | -3. **Draft Jira ticket**: |
28 | | - - **Summary**: Brief, clear title describing the issue (max 100 chars) |
29 | | - - **Description**: Detailed description including: |
30 | | - - What: Clear description of the issue/feature |
31 | | - - Why: Context from the Slack conversation |
32 | | - - Where: Affected components/files (if identified) |
33 | | - - How to reproduce: Steps if it's a bug |
34 | | - - Expected behavior: What should happen |
35 | | - - Additional context: Links to Slack thread, screenshots, etc. |
36 | | - - **Issue Type**: Determine appropriate type: |
37 | | - - `Bug`: Something is broken or not working as intended |
38 | | - - `Task`: Work that needs to be done (improvements, updates) |
39 | | - - `Story`: New feature or functionality |
40 | | - - **Component Detection**: |
41 | | - - Analyze conversation for component mentions (e.g., "Button", "Select", "Modal") |
42 | | - - Map to package paths (e.g., ui-button, ui-select) |
43 | | - - Include in ticket description |
44 | | - |
45 | | -4. **Use inst-ai templates**: |
46 | | - - Templates are located in `.inst-ai/templates/jira` (configured in inst-ai.config.mjs) |
47 | | - - Common templates: `bugReport`, `featureRequest` |
48 | | - - Use `--template <name>` flag when appropriate |
49 | | - - Templates ensure consistent ticket formatting |
50 | | - |
51 | | -5. **Present draft to user**: |
52 | | - - Show the complete ticket draft |
53 | | - - Display summary, description, issue type, components |
54 | | - - Ask user to confirm or request modifications |
55 | | - - **DO NOT create ticket without explicit user confirmation** |
56 | | - |
57 | | -6. **Create ticket**: |
58 | | - - Once confirmed, use `inst-ai jira create` with the drafted content |
59 | | - - If using a template: `inst-ai jira create --template bugReport --content '<json-data>'` |
60 | | - - If custom: `inst-ai jira create --summary "..." --description "..." --type Bug` |
61 | | - - Include link to original Slack thread in description |
62 | | - |
63 | | -7. **Return ticket URL**: |
64 | | - - Display the created Jira ticket URL |
65 | | - - Confirm successful creation |
| 19 | +### 1. Determine Input Type |
| 20 | + |
| 21 | +Analyze the input to determine its type: |
| 22 | +- **Slack URL**: Contains `slack.com/archives/` |
| 23 | +- **GitHub URL**: Contains `github.com/.../issues/` |
| 24 | +- **Text description**: Everything else |
| 25 | + |
| 26 | +### 2. Extract Content Based on Type |
| 27 | + |
| 28 | +#### For Slack URLs: |
| 29 | +- Run `inst-ai slack "<slack-url>" --format xml --include-metadata --include-codesandbox` |
| 30 | +- This extracts the conversation in LLM-friendly XML format with full context |
| 31 | + |
| 32 | +#### For GitHub URLs: |
| 33 | +- Extract owner, repo, and issue number from URL |
| 34 | +- Use `gh issue view <number> --repo <owner>/<repo> --json title,body,labels,comments` |
| 35 | +- Parse the JSON response to get issue details |
| 36 | + |
| 37 | +#### For Text Descriptions: |
| 38 | +- Use the provided text directly as the issue description |
| 39 | +- No fetching needed |
| 40 | + |
| 41 | +### 3. Analyze the Content |
| 42 | + |
| 43 | +Parse the extracted content to identify: |
| 44 | +- The core issue or request |
| 45 | +- Relevant technical details |
| 46 | +- Any mentioned components or file paths |
| 47 | +- User expectations and requirements |
| 48 | +- Screenshots, CodeSandbox links, or other attachments |
| 49 | +- For GitHub issues: existing labels and comments |
| 50 | + |
| 51 | +### 4. Draft Jira Ticket |
| 52 | + |
| 53 | +- **Summary**: Brief, clear title describing the issue (max 100 chars) |
| 54 | + - For GitHub issues: Use the original issue title or adapt it |
| 55 | + - For Slack/text: Create a concise, descriptive title |
| 56 | + |
| 57 | +- **Description**: Detailed description including: |
| 58 | + - What: Clear description of the issue/feature |
| 59 | + - Why: Context from the source (Slack conversation, GitHub discussion, or provided text) |
| 60 | + - Where: Affected components/files (if identified) |
| 61 | + - How to reproduce: Steps if it's a bug |
| 62 | + - Expected behavior: What should happen |
| 63 | + - Additional context: Links to source (Slack thread, GitHub issue), screenshots, etc. |
| 64 | + |
| 65 | +- **Issue Type**: Determine appropriate type: |
| 66 | + - `Bug`: Something is broken or not working as intended |
| 67 | + - `Task`: Work that needs to be done (improvements, updates) |
| 68 | + - `Story`: New feature or functionality |
| 69 | + - For GitHub issues: Consider existing labels to determine type |
| 70 | + |
| 71 | +- **Component Detection**: |
| 72 | + - Analyze content for component mentions (e.g., "Button", "Select", "Modal") |
| 73 | + - Map to package paths (e.g., ui-button, ui-select) |
| 74 | + - Include in ticket description |
| 75 | + |
| 76 | +### 5. Use inst-ai Templates (Optional) |
| 77 | + |
| 78 | +- Templates are located in `.inst-ai/templates/jira` (configured in inst-ai.config.mjs) |
| 79 | +- Common templates: `bugReport`, `featureRequest` |
| 80 | +- Use `--template <name>` flag when appropriate |
| 81 | +- Templates ensure consistent ticket formatting |
| 82 | + |
| 83 | +### 6. Present Draft to User |
| 84 | + |
| 85 | +- Show the complete ticket draft |
| 86 | +- Display summary, description, issue type, components |
| 87 | +- Show the source (Slack URL, GitHub issue URL, or text) |
| 88 | +- Ask user to confirm or request modifications |
| 89 | +- **DO NOT create ticket without explicit user confirmation** |
| 90 | + |
| 91 | +### 7. Create Ticket |
| 92 | + |
| 93 | +Once confirmed, use `inst-ai jira create` with the drafted content: |
| 94 | +- If using a template: `inst-ai jira create --template bugReport --content '<json-data>'` |
| 95 | +- If custom: `inst-ai jira create --summary "..." --description "..." --type Bug` |
| 96 | +- **Always include link to original source in description** (Slack thread or GitHub issue) |
| 97 | + |
| 98 | +### 8. Return Ticket URL |
| 99 | + |
| 100 | +- Display the created Jira ticket URL |
| 101 | +- Confirm successful creation |
| 102 | +- Show the mapping: source → Jira ticket |
66 | 103 |
|
67 | 104 | ## Important Notes |
68 | 105 |
|
69 | | -- **Always analyze the full Slack thread** - don't miss important context from replies |
70 | | -- **Include Slack thread URL in ticket** - for future reference and traceability |
71 | | -- **Component detection is optional** - skip with `--no-component-detection` for non-code issues |
72 | | -- **Use dry-run for testing** - `inst-ai ticket "<url>" --dry-run-jira` previews without creating |
73 | | -- **Handle CodeSandbox content** - if conversation includes CodeSandbox, extract and reference it |
74 | | -- **Ask for clarification** - if conversation is unclear, ask user before creating ticket |
| 106 | +- **Always analyze full content** - For Slack threads: don't miss context from replies. For GitHub: include comments. |
| 107 | +- **Include source URL in ticket** - Always link back to Slack thread or GitHub issue for traceability |
| 108 | +- **Component detection is optional** - Skip for non-code issues |
| 109 | +- **Use dry-run for testing** - `inst-ai jira create --dry-run` previews without creating |
| 110 | +- **Handle attachments** - Extract and reference CodeSandbox links, screenshots, etc. |
| 111 | +- **Ask for clarification** - If content is unclear or ambiguous, ask user before creating ticket |
| 112 | +- **Detect input type automatically** - Parse the input to determine if it's Slack, GitHub, or text |
| 113 | + |
| 114 | +## Example Workflows |
75 | 115 |
|
76 | | -## Example Workflow |
| 116 | +### From Slack Thread |
77 | 117 |
|
78 | 118 | ```bash |
79 | 119 | # Extract Slack conversation |
80 | 120 | inst-ai slack "https://instructure.slack.com/archives/C123/p456" --format xml --include-metadata --include-codesandbox |
81 | 121 |
|
82 | | -# After analysis, create ticket with confirmation |
| 122 | +# After analysis, create ticket |
83 | 123 | inst-ai jira create --summary "Button: Click handler not firing on mobile" \ |
84 | | - --description "Issue reported in Slack thread..." \ |
| 124 | + --description "Issue reported in Slack: https://instructure.slack.com/archives/C123/p456\n\n..." \ |
85 | 125 | --type Bug |
| 126 | +``` |
| 127 | + |
| 128 | +### From GitHub Issue |
86 | 129 |
|
87 | | -# Or use template |
88 | | -inst-ai jira create --template bugReport --content '{"summary":"...","description":"...","issueType":"Bug"}' |
| 130 | +```bash |
| 131 | +# Fetch GitHub issue |
| 132 | +gh issue view 123 --repo instructure/instructure-ui --json title,body,labels,comments |
| 133 | + |
| 134 | +# After analysis, create ticket |
| 135 | +inst-ai jira create --summary "Add dark mode support to Modal component" \ |
| 136 | + --description "Feature request from GitHub: https://github.com/instructure/instructure-ui/issues/123\n\n..." \ |
| 137 | + --type Story |
| 138 | +``` |
| 139 | + |
| 140 | +### From Text Description |
| 141 | + |
| 142 | +```bash |
| 143 | +# User provides text directly, create ticket after drafting |
| 144 | +inst-ai jira create --summary "Select component: Dropdown not closing on blur" \ |
| 145 | + --description "User reported issue:\n\nThe Select component dropdown remains open..." \ |
| 146 | + --type Bug |
89 | 147 | ``` |
90 | 148 |
|
91 | 149 | ## Error Handling |
92 | 150 |
|
93 | | -- If Slack URL is invalid or inaccessible, inform user and ask for correct URL |
94 | | -- If inst-ai is not installed, provide installation instructions |
95 | | -- If configuration is missing, direct user to run `inst-ai config validate` |
96 | | -- If ticket creation fails, show error and suggest using `--dry-run-jira` to debug |
| 151 | +- **Invalid Slack URL**: Inform user and ask for correct URL |
| 152 | +- **Invalid GitHub URL**: Inform user and ask for correct URL or issue number |
| 153 | +- **GitHub CLI not installed**: Provide installation instructions (`gh` is required) |
| 154 | +- **inst-ai not installed**: Provide installation instructions (`npm install -g github:instructure/inst-ai-tool`) |
| 155 | +- **Configuration missing**: Direct user to run `inst-ai config validate` |
| 156 | +- **Ticket creation fails**: Show error and suggest using `--dry-run` to debug |
| 157 | +- **Ambiguous text input**: Ask user for clarification or more details |
0 commit comments