mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
refactor(issue): rename 'labels' to 'tags' in issue schemas and related code
This commit is contained in:
@@ -118,10 +118,10 @@
|
|||||||
"maximum": 5,
|
"maximum": 5,
|
||||||
"description": "Priority 1-5 (1=critical, 5=low)"
|
"description": "Priority 1-5 (1=critical, 5=low)"
|
||||||
},
|
},
|
||||||
"labels": {
|
"tags": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": { "type": "string" },
|
"items": { "type": "string" },
|
||||||
"description": "Suggested labels for the issue"
|
"description": "Suggested tags for the issue"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description": "Pre-filled issue suggestion for export"
|
"description": "Pre-filled issue suggestion for export"
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
"title": "Add null check in user validation",
|
"title": "Add null check in user validation",
|
||||||
"type": "bug",
|
"type": "bug",
|
||||||
"priority": 2,
|
"priority": 2,
|
||||||
"labels": ["bug", "auth"]
|
"tags": ["bug", "auth"]
|
||||||
},
|
},
|
||||||
"external_reference": null,
|
"external_reference": null,
|
||||||
"confidence": 0.85,
|
"confidence": 0.85,
|
||||||
|
|||||||
@@ -37,10 +37,10 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Original source URL (for GitHub issues)"
|
"description": "Original source URL (for GitHub issues)"
|
||||||
},
|
},
|
||||||
"labels": {
|
"tags": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": { "type": "string" },
|
"items": { "type": "string" },
|
||||||
"description": "Issue labels/tags"
|
"description": "Issue tags"
|
||||||
},
|
},
|
||||||
"extended_context": {
|
"extended_context": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
"priority": 1,
|
"priority": 1,
|
||||||
"context": "Connection pool cleanup only happens when MAX_POOL_SIZE is reached...",
|
"context": "Connection pool cleanup only happens when MAX_POOL_SIZE is reached...",
|
||||||
"source": "discovery",
|
"source": "discovery",
|
||||||
"labels": ["bug", "resource-leak", "critical"],
|
"tags": ["bug", "resource-leak", "critical"],
|
||||||
"extended_context": {
|
"extended_context": {
|
||||||
"location": "storage/sqlite_store.py:59",
|
"location": "storage/sqlite_store.py:59",
|
||||||
"suggested_fix": "Implement periodic cleanup or weak references",
|
"suggested_fix": "Implement periodic cleanup or weak references",
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ interface Issue {
|
|||||||
context: string; // Problem description (single source of truth)
|
context: string; // Problem description (single source of truth)
|
||||||
source?: 'github' | 'text' | 'discovery';
|
source?: 'github' | 'text' | 'discovery';
|
||||||
source_url?: string;
|
source_url?: string;
|
||||||
labels?: string[];
|
tags?: string[];
|
||||||
|
|
||||||
// Optional structured fields
|
// Optional structured fields
|
||||||
expected_behavior?: string;
|
expected_behavior?: string;
|
||||||
@@ -354,7 +354,7 @@ function createIssue(data: Partial<Issue>): Issue {
|
|||||||
context: data.context || '',
|
context: data.context || '',
|
||||||
source: data.source,
|
source: data.source,
|
||||||
source_url: data.source_url,
|
source_url: data.source_url,
|
||||||
labels: data.labels,
|
tags: data.tags,
|
||||||
expected_behavior: data.expected_behavior,
|
expected_behavior: data.expected_behavior,
|
||||||
actual_behavior: data.actual_behavior,
|
actual_behavior: data.actual_behavior,
|
||||||
affected_components: data.affected_components,
|
affected_components: data.affected_components,
|
||||||
@@ -714,14 +714,14 @@ async function listAction(issueId: string | undefined, options: IssueOptions): P
|
|||||||
issues = issues.filter(i => statuses.includes(i.status));
|
issues = issues.filter(i => statuses.includes(i.status));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Brief mode: minimal fields only (id, title, status, priority, labels, bound_solution_id)
|
// Brief mode: minimal fields only (id, title, status, priority, tags, bound_solution_id)
|
||||||
if (options.brief) {
|
if (options.brief) {
|
||||||
const briefIssues = issues.map(i => ({
|
const briefIssues = issues.map(i => ({
|
||||||
id: i.id,
|
id: i.id,
|
||||||
title: i.title,
|
title: i.title,
|
||||||
status: i.status,
|
status: i.status,
|
||||||
priority: i.priority,
|
priority: i.priority,
|
||||||
labels: i.labels || [],
|
tags: i.tags || [],
|
||||||
bound_solution_id: i.bound_solution_id
|
bound_solution_id: i.bound_solution_id
|
||||||
}));
|
}));
|
||||||
console.log(JSON.stringify(briefIssues, null, 2));
|
console.log(JSON.stringify(briefIssues, null, 2));
|
||||||
|
|||||||
@@ -458,7 +458,7 @@ export async function handleIssueRoutes(ctx: RouteContext): Promise<boolean> {
|
|||||||
context: body.context || '',
|
context: body.context || '',
|
||||||
source: body.source || 'text',
|
source: body.source || 'text',
|
||||||
source_url: body.source_url || null,
|
source_url: body.source_url || null,
|
||||||
labels: body.labels || [],
|
tags: body.tags || [],
|
||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
updated_at: new Date().toISOString()
|
updated_at: new Date().toISOString()
|
||||||
};
|
};
|
||||||
@@ -517,7 +517,7 @@ export async function handleIssueRoutes(ctx: RouteContext): Promise<boolean> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update other fields
|
// Update other fields
|
||||||
for (const field of ['title', 'context', 'status', 'priority', 'labels']) {
|
for (const field of ['title', 'context', 'status', 'priority', 'tags']) {
|
||||||
if (body[field] !== undefined) {
|
if (body[field] !== undefined) {
|
||||||
issues[issueIndex][field] = body[field];
|
issues[issueIndex][field] = body[field];
|
||||||
updates.push(field);
|
updates.push(field);
|
||||||
@@ -699,7 +699,7 @@ export async function handleIssueRoutes(ctx: RouteContext): Promise<boolean> {
|
|||||||
if (issueIndex === -1) return { error: 'Issue not found' };
|
if (issueIndex === -1) return { error: 'Issue not found' };
|
||||||
|
|
||||||
const updates: string[] = [];
|
const updates: string[] = [];
|
||||||
for (const field of ['title', 'context', 'status', 'priority', 'bound_solution_id', 'labels']) {
|
for (const field of ['title', 'context', 'status', 'priority', 'bound_solution_id', 'tags']) {
|
||||||
if (body[field] !== undefined) {
|
if (body[field] !== undefined) {
|
||||||
issues[issueIndex][field] = body[field];
|
issues[issueIndex][field] = body[field];
|
||||||
updates.push(field);
|
updates.push(field);
|
||||||
|
|||||||
Reference in New Issue
Block a user