generated from ztimson/template
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 078892297e | |||
| 3c2d6f7824 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ztimson/ai-agents",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.6",
|
||||
"description": "AI agents",
|
||||
"keywords": ["ai", "review"],
|
||||
"author": "ztimson",
|
||||
|
||||
@@ -90,7 +90,7 @@ Implementation details, constraints, dependencies, design decisions
|
||||
tools: [{
|
||||
name: 'title',
|
||||
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
|
||||
}, {
|
||||
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(type) fetch(`${git}/api/v1/repos/${owner}/${repo}/issues/${ticket}/labels`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Authorization': `token ${auth}`,
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: `["Kind/${type[0].toUpperCase() + type.slice(1).toLowerCase()}"]`
|
||||
})
|
||||
if(type) {
|
||||
const resp = await fetch(`${git}/api/v1/repos/${owner}/${repo}/issues/${ticket}/labels`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Authorization': `token ${auth}`,
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
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}`);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user