1 Commits

Author SHA1 Message Date
5b9f8e0e13 Fixed minor bugs and typos
All checks were successful
Code review / review (pull_request) Successful in 51s
Publish Library / Build NPM Project (push) Successful in 4s
Publish Library / Tag Version (push) Successful in 5s
2026-01-14 13:14:03 -05:00

View File

@@ -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'},