generated from ztimson/template
Fixed more bugs
This commit is contained in:
@@ -32,7 +32,7 @@ dotenv.config({path: '.env.local', override: true, quiet: true});
|
|||||||
if(resp.ok) return resp.json();
|
if(resp.ok) return resp.json();
|
||||||
else throw new Error(`${resp.status} ${await resp.text()}`);
|
else throw new Error(`${resp.status} ${await resp.text()}`);
|
||||||
});
|
});
|
||||||
if(issueData.labels?.[0]?.name !== 1 || issueData.labels?.[0] !== 'Review/AI') {
|
if(issueData.labels?.[0] !== 1 || issueData.labels?.[0]?.name !== 'Review/AI') {
|
||||||
console.log('Skipping');
|
console.log('Skipping');
|
||||||
return process.exit();
|
return process.exit();
|
||||||
}
|
}
|
||||||
@@ -169,7 +169,7 @@ Output ONLY markdown. No explanations, labels, or extra formatting.`});
|
|||||||
system: `Your job is to identify duplicates. Respond with the ID number of the duplicate or nothing if there are no matches \n\n${dupes}`
|
system: `Your job is to identify duplicates. Respond with the ID number of the duplicate or nothing if there are no matches \n\n${dupes}`
|
||||||
}))?.pop()?.content;
|
}))?.pop()?.content;
|
||||||
// Handle duplicates
|
// Handle duplicates
|
||||||
if(!!hasDuplicates && (dupeId = dupeIds.find(id => new RegExp(`(^| )${id}( |$)`, 'm').test(hasDuplicates)))) {
|
if(!!hasDuplicates && (dupeId = dupeIds.find(id => new RegExp(`\\b${id}\\b`, 'm').test(hasDuplicates)))) {
|
||||||
await fetch(`${git}/api/v1/repos/${owner}/${repo}/issues/${ticket}/comments`, {
|
await fetch(`${git}/api/v1/repos/${owner}/${repo}/issues/${ticket}/comments`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {'Authorization': `token ${auth}`, 'Content-Type': 'application/json'},
|
headers: {'Authorization': `token ${auth}`, 'Content-Type': 'application/json'},
|
||||||
|
|||||||
Reference in New Issue
Block a user