mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +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,
|
||||
"description": "Priority 1-5 (1=critical, 5=low)"
|
||||
},
|
||||
"labels": {
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "Suggested labels for the issue"
|
||||
"description": "Suggested tags for the issue"
|
||||
}
|
||||
},
|
||||
"description": "Pre-filled issue suggestion for export"
|
||||
@@ -205,7 +205,7 @@
|
||||
"title": "Add null check in user validation",
|
||||
"type": "bug",
|
||||
"priority": 2,
|
||||
"labels": ["bug", "auth"]
|
||||
"tags": ["bug", "auth"]
|
||||
},
|
||||
"external_reference": null,
|
||||
"confidence": 0.85,
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
"type": "string",
|
||||
"description": "Original source URL (for GitHub issues)"
|
||||
},
|
||||
"labels": {
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "Issue labels/tags"
|
||||
"description": "Issue tags"
|
||||
},
|
||||
"extended_context": {
|
||||
"type": "object",
|
||||
@@ -120,7 +120,7 @@
|
||||
"priority": 1,
|
||||
"context": "Connection pool cleanup only happens when MAX_POOL_SIZE is reached...",
|
||||
"source": "discovery",
|
||||
"labels": ["bug", "resource-leak", "critical"],
|
||||
"tags": ["bug", "resource-leak", "critical"],
|
||||
"extended_context": {
|
||||
"location": "storage/sqlite_store.py:59",
|
||||
"suggested_fix": "Implement periodic cleanup or weak references",
|
||||
|
||||
@@ -33,7 +33,7 @@ interface Issue {
|
||||
context: string; // Problem description (single source of truth)
|
||||
source?: 'github' | 'text' | 'discovery';
|
||||
source_url?: string;
|
||||
labels?: string[];
|
||||
tags?: string[];
|
||||
|
||||
// Optional structured fields
|
||||
expected_behavior?: string;
|
||||
@@ -354,7 +354,7 @@ function createIssue(data: Partial<Issue>): Issue {
|
||||
context: data.context || '',
|
||||
source: data.source,
|
||||
source_url: data.source_url,
|
||||
labels: data.labels,
|
||||
tags: data.tags,
|
||||
expected_behavior: data.expected_behavior,
|
||||
actual_behavior: data.actual_behavior,
|
||||
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));
|
||||
}
|
||||
|
||||
// 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) {
|
||||
const briefIssues = issues.map(i => ({
|
||||
id: i.id,
|
||||
title: i.title,
|
||||
status: i.status,
|
||||
priority: i.priority,
|
||||
labels: i.labels || [],
|
||||
tags: i.tags || [],
|
||||
bound_solution_id: i.bound_solution_id
|
||||
}));
|
||||
console.log(JSON.stringify(briefIssues, null, 2));
|
||||
|
||||
@@ -458,7 +458,7 @@ export async function handleIssueRoutes(ctx: RouteContext): Promise<boolean> {
|
||||
context: body.context || '',
|
||||
source: body.source || 'text',
|
||||
source_url: body.source_url || null,
|
||||
labels: body.labels || [],
|
||||
tags: body.tags || [],
|
||||
created_at: new Date().toISOString(),
|
||||
updated_at: new Date().toISOString()
|
||||
};
|
||||
@@ -517,7 +517,7 @@ export async function handleIssueRoutes(ctx: RouteContext): Promise<boolean> {
|
||||
}
|
||||
|
||||
// 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) {
|
||||
issues[issueIndex][field] = body[field];
|
||||
updates.push(field);
|
||||
@@ -699,7 +699,7 @@ export async function handleIssueRoutes(ctx: RouteContext): Promise<boolean> {
|
||||
if (issueIndex === -1) return { error: 'Issue not found' };
|
||||
|
||||
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) {
|
||||
issues[issueIndex][field] = body[field];
|
||||
updates.push(field);
|
||||
|
||||
Reference in New Issue
Block a user