generated from ztimson/template
Fixed ticket refining labels
This commit is contained in:
2
.github/workflows/ticket-refinement.yml
vendored
2
.github/workflows/ticket-refinement.yml
vendored
@@ -2,7 +2,7 @@ name: Ticket refinement
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [opened, labeled]
|
types: [labeled]
|
||||||
jobs:
|
jobs:
|
||||||
format:
|
format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ what's happening now or the current state/gap
|
|||||||
|
|
||||||
What should happen instead
|
What should happen instead
|
||||||
|
|
||||||
## Steps to Reproduce
|
## Steps to Reproduce / Desired Flow
|
||||||
|
|
||||||
1. First step
|
1. First step
|
||||||
2. Second step
|
2. Second step
|
||||||
@@ -98,27 +98,36 @@ Implementation details, constraints, dependencies, design decisions
|
|||||||
args: {type: {type: 'string', description: 'Ticket type', enum: ['Bug', 'DevOps', 'Document', 'Enhancement', 'Refactor', 'Security'], required: true}},
|
args: {type: {type: 'string', description: 'Ticket type', enum: ['Bug', 'DevOps', 'Document', 'Enhancement', 'Refactor', 'Security'], required: true}},
|
||||||
fn: (args) => type = args.type
|
fn: (args) => type = args.type
|
||||||
}],
|
}],
|
||||||
system: `You are a ticket formatter. Transform raw issue descriptions into structured tickets.
|
system: `Transform raw tickets into structured markdown following the template EXACTLY.
|
||||||
|
|
||||||
**CRITICAL RULES:**
|
**MANDATORY STEPS:**
|
||||||
1. Identify the ticket type (Bug, DevOps, Enhancement, Refactor, Security)
|
1. Identify ticket type: Bug, DevOps, Document, Enhancement, Refactor, or Security
|
||||||
2. Output MUST only contain the new ticket information in markdown, no extra fluff
|
2. Call \`type\` tool EXACTLY ONCE with the type from step 1
|
||||||
3. Follow the template structure EXACTLY:
|
3. Call \`title\` tool EXACTLY ONCE in format: "[Module] - [Verb] [subject]"
|
||||||
- You must call the \`title\` tool EXACTLY ONCE with the title matching this format: [Module] - [Verb] [noun]
|
4. Output formatted markdown matching template structure below
|
||||||
Example: Storage - Fix file uploads
|
|
||||||
- You must call the \`type\` tool EXACTLY ONCE with the identified ticket type
|
**TEMPLATE RULES:**
|
||||||
- Write a clear description
|
- Use ## headers (match template exactly)
|
||||||
- For bugs: fill Steps to Reproduce with numbered list
|
- Description: Clear summary of the request
|
||||||
- For enhancements/refactors: REMOVE the Steps to Reproduce section entirely
|
- Current Behavior: What's happening now (remove for Document tickets)
|
||||||
- For documentation: REMOVE the Current Behavior, Expected Behavior and Steps to Reproduce sections entirely
|
- Expected Behavior: What should happen (remove for Document tickets)
|
||||||
- Acceptance Criteria: convert requirements into checkboxes (- [ ])
|
- Steps to Reproduce: Numbered list for bugs, flow for enhancements, remove if not applicable
|
||||||
- Weight scoring (0-5 each):
|
- Additional Context: Logs, screenshots, links provided by user
|
||||||
* Size: Number of modules, layers & files affected by change
|
- Acceptance Criteria: Convert to checkboxes (- [ ] format)
|
||||||
* Complexity: Technical difficulty to implement
|
- Technical Notes: Implementation approach, constraints, dependencies
|
||||||
* Unknowns: Research/uncertainty in work estimation
|
- Weight table (use exact format below):
|
||||||
* Calculate Total as sum of the three
|
|
||||||
- Remove sections that are not applicable based on ticket type
|
| Effort / Weight | Score |
|
||||||
- Use proper markdown headers (##)
|
|-----------------|----------|
|
||||||
|
| Size | 0-5 |
|
||||||
|
| Complexity | 0-5 |
|
||||||
|
| Unknowns | 0-5 |
|
||||||
|
| **Total** | **0-15** |
|
||||||
|
|
||||||
|
**SCORING:**
|
||||||
|
- Size: # of modules/layers/files changed
|
||||||
|
- Complexity: Technical difficulty
|
||||||
|
- Unknowns: Research/uncertainty needed
|
||||||
|
|
||||||
**README:**
|
**README:**
|
||||||
\`\`\`markdown
|
\`\`\`markdown
|
||||||
@@ -130,8 +139,7 @@ ${readme.trim() || 'No README available'}
|
|||||||
${template.trim()}
|
${template.trim()}
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
Output ONLY the formatted ticket, no explanation.`
|
Output ONLY markdown. No explanations, labels, or extra formatting.`});
|
||||||
});
|
|
||||||
|
|
||||||
const messages = await ai.language.ask(`Title: ${issueData.title}\n\nDescription:\n${issueData.body || 'No description provided'}`).catch(() => []);
|
const messages = await ai.language.ask(`Title: ${issueData.title}\n\nDescription:\n${issueData.body || 'No description provided'}`).catch(() => []);
|
||||||
const body = messages?.pop()?.content;
|
const body = messages?.pop()?.content;
|
||||||
@@ -160,5 +168,5 @@ Output ONLY the formatted ticket, no explanation.`
|
|||||||
body: `["Kind/${type[0].toUpperCase() + type.slice(1).toLowerCase()}"]`
|
body: `["Kind/${type[0].toUpperCase() + type.slice(1).toLowerCase()}"]`
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(body);
|
console.log(`Title: ${title}\nType: ${type}\nBody:\n${body}`);
|
||||||
})();
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user