2 Commits
0.0.4 ... 0.0.6

Author SHA1 Message Date
078892297e Fixing ticket refiner labels
All checks were successful
Publish Library / Build NPM Project (push) Successful in 6s
Publish Library / Tag Version (push) Successful in 4s
2025-12-30 19:35:27 -05:00
3c2d6f7824 bump 0.0.5
All checks were successful
Publish Library / Build NPM Project (push) Successful in 7s
Publish Library / Tag Version (push) Successful in 4s
2025-12-30 19:26:00 -05:00
2 changed files with 13 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ztimson/ai-agents", "name": "@ztimson/ai-agents",
"version": "0.0.4", "version": "0.0.6",
"description": "AI agents", "description": "AI agents",
"keywords": ["ai", "review"], "keywords": ["ai", "review"],
"author": "ztimson", "author": "ztimson",

View File

@@ -90,7 +90,7 @@ Implementation details, constraints, dependencies, design decisions
tools: [{ tools: [{
name: 'title', name: 'title',
description: 'Set the ticket title, must be called EXACTLY ONCE', description: 'Set the ticket title, must be called EXACTLY ONCE',
args: {value: {type: 'string', description: 'Ticket title, must match format: [Module] - [Verb] [noun]', required: true}}, args: {title: {type: 'string', description: 'Ticket title, must match format: [Module] - [Verb] [noun]', required: true}},
fn: (args) => title = args.title fn: (args) => title = args.title
}, { }, {
name: 'type', name: 'type',
@@ -159,14 +159,17 @@ Output ONLY markdown. No explanations, labels, or extra formatting.`});
}) })
}); });
if(!updateRes.ok) throw new Error(`${updateRes.status} ${await updateRes.text()}`); if(!updateRes.ok) throw new Error(`${updateRes.status} ${await updateRes.text()}`);
if(type) fetch(`${git}/api/v1/repos/${owner}/${repo}/issues/${ticket}/labels`, { if(type) {
const resp = await fetch(`${git}/api/v1/repos/${owner}/${repo}/issues/${ticket}/labels`, {
method: 'POST', method: 'POST',
headers: { headers: {
'Authorization': `token ${auth}`, 'Authorization': `token ${auth}`,
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
body: `["Kind/${type[0].toUpperCase() + type.slice(1).toLowerCase()}"]` body: JSON.stringify([`Kind/${type[0].toUpperCase() + type.slice(1).toLowerCase()}`])
}) });
if(!resp.ok) throw new Error(`${resp.status} ${await resp.text()}`);
}
console.log(`Title: ${title}\nType: ${type}\nBody:\n${body}`); console.log(`Title: ${title}\nType: ${type}\nBody:\n${body}`);
})(); })();