generated from ztimson/template
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 078892297e |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ztimson/ai-agents",
|
"name": "@ztimson/ai-agents",
|
||||||
"version": "0.0.5",
|
"version": "0.0.6",
|
||||||
"description": "AI agents",
|
"description": "AI agents",
|
||||||
"keywords": ["ai", "review"],
|
"keywords": ["ai", "review"],
|
||||||
"author": "ztimson",
|
"author": "ztimson",
|
||||||
|
|||||||
@@ -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) {
|
||||||
method: 'POST',
|
const resp = await fetch(`${git}/api/v1/repos/${owner}/${repo}/issues/${ticket}/labels`, {
|
||||||
headers: {
|
method: 'POST',
|
||||||
'Authorization': `token ${auth}`,
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Authorization': `token ${auth}`,
|
||||||
},
|
'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}`);
|
||||||
})();
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user