Added configurable labels to ticket refiner #13

Merged
ztimson merged 3 commits from ticket-duplicates into master 2026-01-14 13:22:33 -05:00
Owner
No description provided.
ztimson added 1 commit 2026-01-14 13:07:21 -05:00
Added configurable labels to ticket refiner
All checks were successful
Publish Library / Build NPM Project (push) Successful in 5s
Publish Library / Tag Version (push) Successful in 7s
Code review / review (pull_request) Successful in 48s
decd533e4e
assistant reviewed 2026-01-14 13:08:06 -05:00
assistant left a comment
First-time contributor

Summary

I've identified 8 issues in this code review:

Critical Issues:

  1. Async/await bug - The add_label function doesn't properly await its fetch call, which could lead to race conditions or silent failures when adding labels
  2. Type comparison issue - The duplicate detection compares issue IDs (likely numbers) with string content, which may cause matching failures
  3. Fragile duplicate parsing - The duplicate ID extraction logic could fail if the AI returns additional text beyond just the ID

Moderate Issues:

  1. String replacement bug - Two instances where .replace(',', ', ') only replaces the first comma instead of all commas, affecting label formatting in AI prompts
  2. Dead code - The type variable is still declared but no longer used after refactoring

Minor Issues:

  1. Grammar error - Template text changed from "Any other" to "Anything other" (incorrect grammar)
  2. Typo - "formated" should be "formatted" in the system prompt

Positive Changes:

  • Good refactoring from a single type tool to a more flexible add_label tool that supports multiple labels
  • Improved configurability with environment variables for label names
  • Better duplicate detection by including the current issue's ID in the prompt
  • More explicit AI instructions with numbered steps

The changes represent a solid improvement in functionality, but the async handling bug and string replacement issues should be addressed before merging to production.

## Summary I've identified **8 issues** in this code review: ### Critical Issues: 1. **Async/await bug** - The `add_label` function doesn't properly await its fetch call, which could lead to race conditions or silent failures when adding labels 2. **Type comparison issue** - The duplicate detection compares issue IDs (likely numbers) with string content, which may cause matching failures 3. **Fragile duplicate parsing** - The duplicate ID extraction logic could fail if the AI returns additional text beyond just the ID ### Moderate Issues: 4. **String replacement bug** - Two instances where `.replace(',', ', ')` only replaces the first comma instead of all commas, affecting label formatting in AI prompts 5. **Dead code** - The `type` variable is still declared but no longer used after refactoring ### Minor Issues: 6. **Grammar error** - Template text changed from "Any other" to "Anything other" (incorrect grammar) 7. **Typo** - "formated" should be "formatted" in the system prompt ### Positive Changes: - Good refactoring from a single `type` tool to a more flexible `add_label` tool that supports multiple labels - Improved configurability with environment variables for label names - Better duplicate detection by including the current issue's ID in the prompt - More explicit AI instructions with numbered steps The changes represent a solid improvement in functionality, but the async handling bug and string replacement issues should be addressed before merging to production.
First-time contributor

Grammar error: "Anything other" should be "Any other". The original text was correct.

Grammar error: "Anything other" should be "Any other". The original text was correct.
ztimson marked this conversation as resolved
@@ -40,3 +44,3 @@
// Gather readme & template
let title = '', type = '', readme = '', readmeP = path.join(process.cwd(), 'README.md');
let title = '', type = '', labels = [], readme = '', readmeP = path.join(process.cwd(), 'README.md');
if(fs.existsSync(readmeP)) readme = fs.readFileSync(readmeP, 'utf-8');
First-time contributor

Unused variable 'type' is still declared but never used after refactoring. It should be removed from the declaration on line 46.

Unused variable 'type' is still declared but never used after refactoring. It should be removed from the declaration on line 46.
ztimson marked this conversation as resolved
@@ -103,0 +104,4 @@
description: 'Add a label to the ticket',
args: {label: {type: 'string', description: 'Label name', required: true}},
fn: async (args) => {
labels.push(args.label);
First-time contributor

The add_label function doesn't await the fetch call, which means errors may not be properly handled. The function is declared as async but doesn't await the promise, potentially causing race conditions or silent failures.

The add_label function doesn't await the fetch call, which means errors may not be properly handled. The function is declared as async but doesn't await the promise, potentially causing race conditions or silent failures.
ztimson marked this conversation as resolved
src/refine.mjs Outdated
@@ -109,2 +118,2 @@
3. Call \`title\` tool EXACTLY ONCE in format: "[Module] - [Verb] [subject]" (example: Storage - fix file uploads)
4. Output formatted markdown matching template structure below
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(',', ', ')}
First-time contributor

String replacement issue: Using .replace(',', ', ') only replaces the first comma. This should be .replace(/,/g, ', ') to replace all commas with comma-space for proper formatting.

String replacement issue: Using `.replace(',', ', ')` only replaces the first comma. This should be `.replace(/,/g, ', ')` to replace all commas with comma-space for proper formatting.
ztimson marked this conversation as resolved
@@ -111,0 +119,4 @@
2. Identify one label from each group which best applies to the ticket: ${labelsReq.replace(',', ', ')}
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(',', ', ')}
5. Call the \`add_label\` tool ONCE FOR EVERY LABEL identified in the previous step
First-time contributor

Same string replacement issue: .replace(',', ', ') only replaces the first comma. Should use .replace(/,/g, ', ') to replace all commas.

Same string replacement issue: `.replace(',', ', ')` only replaces the first comma. Should use `.replace(/,/g, ', ')` to replace all commas.
ztimson marked this conversation as resolved
src/refine.mjs Outdated
@@ -111,0 +120,4 @@
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(',', ', ')}
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:
First-time contributor

Typo in prompt: "formated markdown" should be "formatted markdown".

Typo in prompt: "formated markdown" should be "formatted markdown".
ztimson marked this conversation as resolved
src/refine.mjs Outdated
@@ -170,3 +183,3 @@
}))?.pop()?.content;
// Handle duplicates
if(!!hasDuplicates && (dupeId = dupeIds.find(id => new RegExp(`\\b${id}\\b`, 'm').test(hasDuplicates)))) {
if(hasDuplicates && hasDuplicates !== 'NONE' && (dupeId = dupeIds.find(id => id === hasDuplicates.trim()))) {
First-time contributor

Potential type mismatch in duplicate detection: The code compares id === hasDuplicates.trim() but issue IDs are typically numbers while hasDuplicates is a string. This comparison may fail if strict type checking is involved. Consider parsing the ID or ensuring type consistency.

Potential type mismatch in duplicate detection: The code compares `id === hasDuplicates.trim()` but issue IDs are typically numbers while hasDuplicates is a string. This comparison may fail if strict type checking is involved. Consider parsing the ID or ensuring type consistency.
First-time contributor

The duplicate detection logic could fail if the AI returns the ID with additional text. Consider using a more robust parsing approach like parseInt(hasDuplicates) or regex extraction to handle edge cases.

The duplicate detection logic could fail if the AI returns the ID with additional text. Consider using a more robust parsing approach like `parseInt(hasDuplicates)` or regex extraction to handle edge cases.
ztimson marked this conversation as resolved
ztimson added 1 commit 2026-01-14 13:11:16 -05:00
Merge branch 'master' of git.zakscode.com:ztimson/ai-agents into ticket-duplicates
All checks were successful
Publish Library / Build NPM Project (push) Successful in 4s
Publish Library / Tag Version (push) Successful in 16s
Code review / review (pull_request) Successful in 51s
019b05105a
assistant reviewed 2026-01-14 13:12:09 -05:00
assistant left a comment
First-time contributor

Review Summary

This code review identified 8 issues that should be addressed in the refactoring changes:

Critical Issues:

  1. Security vulnerability (line 110): Direct string interpolation of user-provided label values into JSON could break the JSON structure or introduce injection vulnerabilities
  2. Race condition risk (line 107): The add_label function doesn't await its fetch call, potentially causing silent failures and incorrect label application

Bugs:
3. Type mismatch (line 185): Comparison between numeric IDs and string values in duplicate detection may fail
4. String replacement bug (lines 119, 122): Only replaces first comma instead of all commas in label lists

Code Quality:
5. Unused variable (line 46): The type variable is declared but never used after refactoring
6. Typo (line 123): "formated" should be "formatted"
7. Inconsistent null safety (line 39): Mixed use of optional chaining patterns

Positive Changes:

  • Good refactoring from hardcoded type labels to configurable environment variables
  • Improved flexibility with LABELS_REQ and LABELS_OPT configuration
  • Better separation of concerns with the add_label tool
  • Enhanced duplicate detection with more specific prompt instructions
  • Version bump appropriately reflects the changes

The refactoring direction is solid, but the issues identified (especially the security concern and async handling) should be addressed before merging.

## Review Summary This code review identified **8 issues** that should be addressed in the refactoring changes: **Critical Issues:** 1. **Security vulnerability** (line 110): Direct string interpolation of user-provided label values into JSON could break the JSON structure or introduce injection vulnerabilities 2. **Race condition risk** (line 107): The `add_label` function doesn't await its fetch call, potentially causing silent failures and incorrect label application **Bugs:** 3. **Type mismatch** (line 185): Comparison between numeric IDs and string values in duplicate detection may fail 4. **String replacement bug** (lines 119, 122): Only replaces first comma instead of all commas in label lists **Code Quality:** 5. **Unused variable** (line 46): The `type` variable is declared but never used after refactoring 6. **Typo** (line 123): "formated" should be "formatted" 7. **Inconsistent null safety** (line 39): Mixed use of optional chaining patterns **Positive Changes:** - Good refactoring from hardcoded type labels to configurable environment variables - Improved flexibility with `LABELS_REQ` and `LABELS_OPT` configuration - Better separation of concerns with the `add_label` tool - Enhanced duplicate detection with more specific prompt instructions - Version bump appropriately reflects the changes The refactoring direction is solid, but the issues identified (especially the security concern and async handling) should be addressed before merging.
@@ -33,3 +37,3 @@
else throw new Error(`${resp.status} ${await resp.text()}`);
});
if(issueData.labels?.[0] !== 1 || issueData.labels?.[0]?.name !== 'Review/AI') {
if(issueData.labels?.length !== 1 || issueData.labels[0]?.name !== labelEnabled) {
First-time contributor

Array access without null safety: The code accesses issueData.labels[0]?.name but doesn't check if the array exists before checking length. While the optional chaining on labels?.[0] is safe, consider using issueData.labels?.[0]?.name for consistency with the length check pattern.

Array access without null safety: The code accesses `issueData.labels[0]?.name` but doesn't check if the array exists before checking length. While the optional chaining on `labels?.[0]` is safe, consider using `issueData.labels?.[0]?.name` for consistency with the length check pattern.
ztimson marked this conversation as resolved
@@ -40,3 +44,3 @@
// Gather readme & template
let title = '', type = '', readme = '', readmeP = path.join(process.cwd(), 'README.md');
let title = '', type = '', labels = [], readme = '', readmeP = path.join(process.cwd(), 'README.md');
if(fs.existsSync(readmeP)) readme = fs.readFileSync(readmeP, 'utf-8');
First-time contributor

Unused variable 'type' is still declared but never used after refactoring. This variable should be removed from the declaration since the type-based labeling was replaced with the add_label tool.

Unused variable 'type' is still declared but never used after refactoring. This variable should be removed from the declaration since the type-based labeling was replaced with the add_label tool.
ztimson marked this conversation as resolved
@@ -103,0 +104,4 @@
description: 'Add a label to the ticket',
args: {label: {type: 'string', description: 'Label name', required: true}},
fn: async (args) => {
labels.push(args.label);
First-time contributor

The add_label function doesn't await the fetch call. While the function is declared as async, the fetch promise is not awaited, which means errors may not be properly handled and could cause race conditions. Consider using 'await' before the fetch call to ensure proper error handling and sequencing.

The add_label function doesn't await the fetch call. While the function is declared as async, the fetch promise is not awaited, which means errors may not be properly handled and could cause race conditions. Consider using 'await' before the fetch call to ensure proper error handling and sequencing.
ztimson marked this conversation as resolved
@@ -103,0 +107,4 @@
labels.push(args.label);
fetch(`${git}/api/v1/repos/${owner}/${repo}/issues/${ticket}/labels`, {
method: 'POST',
headers: {'Authorization': `token ${auth}`, 'Content-Type': 'application/json'},
First-time contributor

Security concern: The label value from args.label is directly interpolated into a JSON string without escaping. If the label contains special characters like quotes, it could break the JSON structure. Use JSON.stringify() instead: body: JSON.stringify({labels: [args.label]})

Security concern: The label value from args.label is directly interpolated into a JSON string without escaping. If the label contains special characters like quotes, it could break the JSON structure. Use JSON.stringify() instead: `body: JSON.stringify({labels: [args.label]})`
ztimson marked this conversation as resolved
src/refine.mjs Outdated
@@ -109,2 +118,2 @@
3. Call \`title\` tool EXACTLY ONCE in format: "[Module] - [Verb] [subject]" (example: Storage - fix file uploads)
4. Output formatted markdown matching template structure below
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(',', ', ')}
First-time contributor

String replacement issue: Using .replace(',', ', ') only replaces the first comma. This should be .replace(/,/g, ', ') to replace all commas with comma-space for proper formatting of the labels list in the prompt.

String replacement issue: Using `.replace(',', ', ')` only replaces the first comma. This should be `.replace(/,/g, ', ')` to replace all commas with comma-space for proper formatting of the labels list in the prompt.
ztimson marked this conversation as resolved
@@ -111,0 +119,4 @@
2. Identify one label from each group which best applies to the ticket: ${labelsReq.replace(',', ', ')}
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(',', ', ')}
5. Call the \`add_label\` tool ONCE FOR EVERY LABEL identified in the previous step
First-time contributor

Same string replacement issue: .replace(',', ', ') only replaces the first comma. Should use .replace(/,/g, ', ') to replace all commas for proper formatting of the optional labels list.

Same string replacement issue: `.replace(',', ', ')` only replaces the first comma. Should use `.replace(/,/g, ', ')` to replace all commas for proper formatting of the optional labels list.
ztimson marked this conversation as resolved
src/refine.mjs Outdated
@@ -111,0 +120,4 @@
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(',', ', ')}
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:
First-time contributor

Typo in prompt: "formated markdown" should be "formatted markdown" (missing 't').

Typo in prompt: "formated markdown" should be "formatted markdown" (missing 't').
ztimson marked this conversation as resolved
src/refine.mjs Outdated
@@ -170,3 +183,3 @@
}))?.pop()?.content;
// Handle duplicates
if(!!hasDuplicates && (dupeId = dupeIds.find(id => new RegExp(`\\b${id}\\b`, 'm').test(hasDuplicates)))) {
if(hasDuplicates && hasDuplicates !== 'NONE' && (dupeId = dupeIds.find(id => id === hasDuplicates.trim()))) {
First-time contributor

Potential type mismatch in duplicate detection: The code compares id === hasDuplicates.trim() where issue IDs are typically numbers while hasDuplicates is a string. This comparison may fail with strict type checking. Consider using id.toString() === hasDuplicates.trim() or id === parseInt(hasDuplicates) to ensure type consistency.

Potential type mismatch in duplicate detection: The code compares `id === hasDuplicates.trim()` where issue IDs are typically numbers while hasDuplicates is a string. This comparison may fail with strict type checking. Consider using `id.toString() === hasDuplicates.trim()` or `id === parseInt(hasDuplicates)` to ensure type consistency.
ztimson marked this conversation as resolved
ztimson added 1 commit 2026-01-14 13:14:08 -05:00
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
5b9f8e0e13
assistant reviewed 2026-01-14 13:14:59 -05:00
assistant left a comment
First-time contributor

Overall Review Summary

This update (v0.1.0 → v0.1.1) represents a significant refactoring of the AI ticket refinement system with several improvements:

Positive Changes:

  • Better configurability: Moving hardcoded labels to environment variables (LABELS_DUPE, LABEL_ENABLED, LABELS_REQ, LABELS_OPT) makes the system more flexible
  • Improved AI workflow: Replacing the single type tool with a more flexible add_label tool allows for multi-dimensional categorization
  • Enhanced duplicate detection: Adding the issue ID to the duplicate check and using "NONE" as an explicit response improves clarity
  • Better prompts: The updated system prompts provide clearer instructions and better context

Critical Issues Found:

  1. Security vulnerability (lines 110, 194): Direct string interpolation in JSON construction could lead to injection attacks if labels contain quotes or special characters
  2. Race condition risk (line 107): Multiple async label additions without proper synchronization could cause issues
  3. Missing await (line 109): The fetch call isn't awaited, potentially causing silent failures

Moderate Concerns:
4. Type coercion ambiguity (line 185): Using == instead of explicit type conversion makes the code less maintainable
5. Duplicate detection logic (line 181): Including the current issue's ID in the comparison input could confuse the AI

The refactoring is well-intentioned and improves the system's flexibility, but the security issue with JSON construction should be addressed before deployment. The race condition with label additions may also cause intermittent issues in production.

## Overall Review Summary This update (v0.1.0 → v0.1.1) represents a significant refactoring of the AI ticket refinement system with several improvements: **Positive Changes:** - **Better configurability**: Moving hardcoded labels to environment variables (`LABELS_DUPE`, `LABEL_ENABLED`, `LABELS_REQ`, `LABELS_OPT`) makes the system more flexible - **Improved AI workflow**: Replacing the single `type` tool with a more flexible `add_label` tool allows for multi-dimensional categorization - **Enhanced duplicate detection**: Adding the issue ID to the duplicate check and using "NONE" as an explicit response improves clarity - **Better prompts**: The updated system prompts provide clearer instructions and better context **Critical Issues Found:** 1. **Security vulnerability** (lines 110, 194): Direct string interpolation in JSON construction could lead to injection attacks if labels contain quotes or special characters 2. **Race condition risk** (line 107): Multiple async label additions without proper synchronization could cause issues 3. **Missing await** (line 109): The fetch call isn't awaited, potentially causing silent failures **Moderate Concerns:** 4. **Type coercion ambiguity** (line 185): Using `==` instead of explicit type conversion makes the code less maintainable 5. **Duplicate detection logic** (line 181): Including the current issue's ID in the comparison input could confuse the AI The refactoring is well-intentioned and improves the system's flexibility, but the security issue with JSON construction should be addressed before deployment. The race condition with label additions may also cause intermittent issues in production.
@@ -103,0 +104,4 @@
description: 'Add a label to the ticket',
args: {label: {type: 'string', description: 'Label name', required: true}},
fn: async (args) => {
labels.push(args.label);
First-time contributor

Race condition risk: The add_label function is called multiple times in the AI tool execution flow, but there's no guarantee of execution order or completion. If the AI calls add_label multiple times rapidly, the labels array may not be properly synchronized with the actual API calls. Consider awaiting all label operations or using a queue.

Race condition risk: The add_label function is called multiple times in the AI tool execution flow, but there's no guarantee of execution order or completion. If the AI calls add_label multiple times rapidly, the labels array may not be properly synchronized with the actual API calls. Consider awaiting all label operations or using a queue.
ztimson marked this conversation as resolved
@@ -103,0 +106,4 @@
fn: async (args) => {
labels.push(args.label);
return await fetch(`${git}/api/v1/repos/${owner}/${repo}/issues/${ticket}/labels`, {
method: 'POST',
First-time contributor

The fetch call inside add_label is not awaited before returning. While the function is async and returns the promise, this could cause issues with error handling and sequencing. Consider using await fetch(...) to ensure proper error propagation.

The fetch call inside add_label is not awaited before returning. While the function is async and returns the promise, this could cause issues with error handling and sequencing. Consider using `await fetch(...)` to ensure proper error propagation.
ztimson marked this conversation as resolved
@@ -103,0 +107,4 @@
labels.push(args.label);
return await fetch(`${git}/api/v1/repos/${owner}/${repo}/issues/${ticket}/labels`, {
method: 'POST',
headers: {'Authorization': `token ${auth}`, 'Content-Type': 'application/json'},
First-time contributor

Security concern: The label value from args.label is directly interpolated into a JSON string without escaping. If the label contains special characters like quotes, it could break the JSON structure or cause injection issues. Use JSON.stringify({labels: [args.label]}) instead of template literals.

Security concern: The label value from args.label is directly interpolated into a JSON string without escaping. If the label contains special characters like quotes, it could break the JSON structure or cause injection issues. Use `JSON.stringify({labels: [args.label]})` instead of template literals.
ztimson marked this conversation as resolved
@@ -109,2 +118,2 @@
3. Call \`title\` tool EXACTLY ONCE in format: "[Module] - [Verb] [subject]" (example: Storage - fix file uploads)
4. Output formatted markdown matching template structure below
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.replaceAll(',', ', ')}
First-time contributor

String replacement issue: Using .replaceAll(',', ', ') is correct, but note this requires Node.js 15+. If supporting older versions, use .replace(/,/g, ', ') instead for compatibility.

String replacement issue: Using `.replaceAll(',', ', ')` is correct, but note this requires Node.js 15+. If supporting older versions, use `.replace(/,/g, ', ')` instead for compatibility.
ztimson marked this conversation as resolved
@@ -167,3 +180,2 @@
const dupes = search.map(t => `ID: ${t.id}\nTitle: ${t.title}\n\`\`\`markdown\n${t.body}\n\`\`\``).join('\n\n');
const hasDuplicates = (await ai.language.ask(`${title}\n\`\`\`markdown\n${body}\n\`\`\``, {
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}`
const hasDuplicates = (await ai.language.ask(`ID: ${issueData.id}\nTitle: ${title}\n\`\`\`markdown\n${body}\n\`\`\``, {
First-time contributor

The duplicate detection prompt now includes the current issue's ID in the input, which could confuse the AI if it returns its own ID as a duplicate. Consider adding explicit instructions to the system prompt to ignore the first ID or exclude the current issue from the search results.

The duplicate detection prompt now includes the current issue's ID in the input, which could confuse the AI if it returns its own ID as a duplicate. Consider adding explicit instructions to the system prompt to ignore the first ID or exclude the current issue from the search results.
@@ -170,3 +183,3 @@
}))?.pop()?.content;
// Handle duplicates
if(!!hasDuplicates && (dupeId = dupeIds.find(id => new RegExp(`\\b${id}\\b`, 'm').test(hasDuplicates)))) {
if(hasDuplicates && hasDuplicates !== 'NONE' && (dupeId = dupeIds.find(id => id == hasDuplicates.trim()))) {
First-time contributor

Type coercion in duplicate detection: Using loose equality id == hasDuplicates.trim() is intentional for type coercion, but this could mask bugs. Consider being explicit with id === parseInt(hasDuplicates.trim(), 10) or id.toString() === hasDuplicates.trim() to make the type conversion clear and handle NaN cases.

Type coercion in duplicate detection: Using loose equality `id == hasDuplicates.trim()` is intentional for type coercion, but this could mask bugs. Consider being explicit with `id === parseInt(hasDuplicates.trim(), 10)` or `id.toString() === hasDuplicates.trim()` to make the type conversion clear and handle NaN cases.
ztimson marked this conversation as resolved
@@ -179,3 +192,3 @@
method: 'POST',
headers: {'Authorization': `token ${auth}`, 'Content-Type': 'application/json'},
body: '{"labels":["Reviewed/Duplicate"]}'
body: `{"labels":["${labelDupe}"]}`
First-time contributor

Inconsistent JSON construction: This line correctly uses template literal for the label variable, but it has the same security issue as line 110. For consistency and safety, use JSON.stringify({labels: [labelDupe]}) throughout the codebase.

Inconsistent JSON construction: This line correctly uses template literal for the label variable, but it has the same security issue as line 110. For consistency and safety, use `JSON.stringify({labels: [labelDupe]})` throughout the codebase.
ztimson marked this conversation as resolved
ztimson merged commit f543e08e36 into master 2026-01-14 13:22:33 -05:00
ztimson deleted branch ticket-duplicates 2026-01-14 13:22:33 -05:00
Sign in to join this conversation.