generated from ztimson/template
Compare commits
4 Commits
decd533e4e
...
0.1.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b9f8e0e13 | |||
| 019b05105a | |||
| 7becf99be2 | |||
| 99a1e55471 |
2
.github/issue_template/ai-refinement.md
vendored
2
.github/issue_template/ai-refinement.md
vendored
@@ -16,4 +16,4 @@ How can it be fixed or improved?
|
||||
|
||||
Steps to reproduce?
|
||||
|
||||
Anything other useful information, logs or screenshots?
|
||||
Any other useful information? Logs, screenshots, steps to reproduce?
|
||||
@@ -42,7 +42,7 @@ dotenv.config({path: '.env.local', override: true, quiet: true, debug: false});
|
||||
}
|
||||
|
||||
// Gather readme & template
|
||||
let title = '', type = '', labels = [], readme = '', readmeP = path.join(process.cwd(), 'README.md');
|
||||
let title = '', labels = [], readme = '', readmeP = path.join(process.cwd(), 'README.md');
|
||||
if(fs.existsSync(readmeP)) readme = fs.readFileSync(readmeP, 'utf-8');
|
||||
const template = p ? fs.readFileSync(p, 'utf-8') : `## Description
|
||||
|
||||
@@ -105,7 +105,7 @@ Implementation details, constraints, dependencies, design decisions
|
||||
args: {label: {type: 'string', description: 'Label name', required: true}},
|
||||
fn: async (args) => {
|
||||
labels.push(args.label);
|
||||
fetch(`${git}/api/v1/repos/${owner}/${repo}/issues/${ticket}/labels`, {
|
||||
return await fetch(`${git}/api/v1/repos/${owner}/${repo}/issues/${ticket}/labels`, {
|
||||
method: 'POST',
|
||||
headers: {'Authorization': `token ${auth}`, 'Content-Type': 'application/json'},
|
||||
body: `{"labels":["${args.label}"]}`
|
||||
@@ -116,11 +116,11 @@ Implementation details, constraints, dependencies, design decisions
|
||||
|
||||
**MANDATORY STEPS:**
|
||||
1. Call \`title\` tool EXACTLY ONCE in format: "[Module] - [Verb] [subject]" (example: Storage - fix file uploads)
|
||||
2. Identify one label from each group which best applies to the ticket: ${labelsReq.replace(',', ', ')}
|
||||
2. Identify one label from each group which best applies to the ticket: ${labelsReq.replaceAll(',', ', ')}
|
||||
3. Call the \`add_label\` tool ONCE FOR EVERY LABEL identified in the previous step
|
||||
4. Filter the following labels to any that apply to this ticket: ${labelsOpt.replace(',', ', ')}
|
||||
4. Filter the following labels to any that apply to this ticket: ${labelsOpt.replaceAll(',', ', ')}
|
||||
5. Call the \`add_label\` tool ONCE FOR EVERY LABEL identified in the previous step
|
||||
6. Output the new ticket description in formated markdown matching the following rules:
|
||||
6. Output the new ticket description in formatted markdown matching the following rules:
|
||||
|
||||
**TEMPLATE RULES:**
|
||||
- Use ## headers (match template exactly)
|
||||
@@ -182,7 +182,7 @@ Output ONLY markdown. No explanations, labels, or extra formatting.`});
|
||||
system: `Your job is to identify duplicates. Respond ONLY with the duplicate's ID number or "NONE" if no match exists\n\n${dupes}`
|
||||
}))?.pop()?.content;
|
||||
// Handle duplicates
|
||||
if(hasDuplicates && hasDuplicates !== 'NONE' && (dupeId = dupeIds.find(id => id === hasDuplicates.trim()))) {
|
||||
if(hasDuplicates && hasDuplicates !== 'NONE' && (dupeId = dupeIds.find(id => id == hasDuplicates.trim()))) {
|
||||
await fetch(`${git}/api/v1/repos/${owner}/${repo}/issues/${ticket}/comments`, {
|
||||
method: 'POST',
|
||||
headers: {'Authorization': `token ${auth}`, 'Content-Type': 'application/json'},
|
||||
|
||||
Reference in New Issue
Block a user