specweave 0.22.13 ā 0.22.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/README.md +2 -2
- package/CLAUDE.md +269 -51
- package/README.md +33 -10
- package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.d.ts +1 -1
- package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js +1 -1
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.js +1 -1
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.js +4 -1
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-spec-sync.d.ts +1 -1
- package/dist/plugins/specweave-github/lib/github-spec-sync.js +1 -1
- package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts +9 -0
- package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js +10 -1
- package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js.map +1 -1
- package/dist/plugins/specweave-github/lib/progress-comment-builder.js +2 -2
- package/dist/plugins/specweave-github/lib/progress-comment-builder.js.map +1 -1
- package/dist/plugins/specweave-github/lib/types.d.ts +1 -1
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +313 -1
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.js +41 -24
- package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
- package/dist/src/config/import-config.d.ts +69 -0
- package/dist/src/config/import-config.d.ts.map +1 -0
- package/dist/src/config/import-config.js +136 -0
- package/dist/src/config/import-config.js.map +1 -0
- package/dist/src/config/types.d.ts +10 -10
- package/dist/src/core/living-docs/living-docs-sync.d.ts +2 -0
- package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.js +10 -1
- package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
- package/dist/src/core/living-docs/task-project-specific-generator.d.ts +2 -2
- package/dist/src/core/living-docs/task-project-specific-generator.js +2 -2
- package/dist/src/core/repo-structure/prompt-consolidator.d.ts +2 -2
- package/dist/src/core/repo-structure/prompt-consolidator.d.ts.map +1 -1
- package/dist/src/core/repo-structure/prompt-consolidator.js +3 -15
- package/dist/src/core/repo-structure/prompt-consolidator.js.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.js +3 -6
- package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
- package/dist/src/core/spec-content-sync.d.ts +4 -1
- package/dist/src/core/spec-content-sync.d.ts.map +1 -1
- package/dist/src/core/spec-content-sync.js +139 -4
- package/dist/src/core/spec-content-sync.js.map +1 -1
- package/dist/src/core/spec-task-mapper.d.ts.map +1 -1
- package/dist/src/core/spec-task-mapper.js +9 -8
- package/dist/src/core/spec-task-mapper.js.map +1 -1
- package/dist/src/core/status-line-validator.d.ts +63 -0
- package/dist/src/core/status-line-validator.d.ts.map +1 -0
- package/dist/src/core/status-line-validator.js +253 -0
- package/dist/src/core/status-line-validator.js.map +1 -0
- package/dist/src/core/sync/bidirectional-engine.d.ts +10 -1
- package/dist/src/core/sync/bidirectional-engine.d.ts.map +1 -1
- package/dist/src/core/sync/bidirectional-engine.js +10 -1
- package/dist/src/core/sync/bidirectional-engine.js.map +1 -1
- package/dist/src/core/sync/profile-manager.d.ts.map +1 -1
- package/dist/src/core/sync/profile-manager.js +3 -0
- package/dist/src/core/sync/profile-manager.js.map +1 -1
- package/dist/src/core/sync/project-context.d.ts.map +1 -1
- package/dist/src/core/sync/project-context.js +3 -0
- package/dist/src/core/sync/project-context.js.map +1 -1
- package/dist/src/core/sync/status-sync-engine.d.ts +1 -1
- package/dist/src/core/sync/status-sync-engine.js +1 -1
- package/dist/src/core/types/origin-metadata.d.ts +153 -0
- package/dist/src/core/types/origin-metadata.d.ts.map +1 -0
- package/dist/src/core/types/origin-metadata.js +166 -0
- package/dist/src/core/types/origin-metadata.js.map +1 -0
- package/dist/src/core/types/sync-profile.d.ts +8 -2
- package/dist/src/core/types/sync-profile.d.ts.map +1 -1
- package/dist/src/core/types/sync-profile.js.map +1 -1
- package/dist/src/core/types/sync-settings.d.ts +73 -0
- package/dist/src/core/types/sync-settings.d.ts.map +1 -0
- package/dist/src/core/types/sync-settings.js +90 -0
- package/dist/src/core/types/sync-settings.js.map +1 -0
- package/dist/src/core/utils/permission-checker.d.ts +100 -0
- package/dist/src/core/utils/permission-checker.d.ts.map +1 -0
- package/dist/src/core/utils/permission-checker.js +166 -0
- package/dist/src/core/utils/permission-checker.js.map +1 -0
- package/dist/src/generators/spec/spec-parser.js +3 -3
- package/dist/src/generators/spec/spec-parser.js.map +1 -1
- package/dist/src/generators/spec/task-parser.js +4 -4
- package/dist/src/generators/spec/task-parser.js.map +1 -1
- package/dist/src/id-generators/task-id-generator.d.ts +96 -0
- package/dist/src/id-generators/task-id-generator.d.ts.map +1 -0
- package/dist/src/id-generators/task-id-generator.js +143 -0
- package/dist/src/id-generators/task-id-generator.js.map +1 -0
- package/dist/src/id-generators/us-id-generator.d.ts +96 -0
- package/dist/src/id-generators/us-id-generator.d.ts.map +1 -0
- package/dist/src/id-generators/us-id-generator.js +143 -0
- package/dist/src/id-generators/us-id-generator.js.map +1 -0
- package/dist/src/importers/ado-importer.d.ts +43 -0
- package/dist/src/importers/ado-importer.d.ts.map +1 -0
- package/dist/src/importers/ado-importer.js +234 -0
- package/dist/src/importers/ado-importer.js.map +1 -0
- package/dist/src/importers/external-importer.d.ts +96 -0
- package/dist/src/importers/external-importer.d.ts.map +1 -0
- package/dist/src/importers/external-importer.js +13 -0
- package/dist/src/importers/external-importer.js.map +1 -0
- package/dist/src/importers/github-importer.d.ts +37 -0
- package/dist/src/importers/github-importer.d.ts.map +1 -0
- package/dist/src/importers/github-importer.js +161 -0
- package/dist/src/importers/github-importer.js.map +1 -0
- package/dist/src/importers/import-coordinator.d.ts +90 -0
- package/dist/src/importers/import-coordinator.d.ts.map +1 -0
- package/dist/src/importers/import-coordinator.js +182 -0
- package/dist/src/importers/import-coordinator.js.map +1 -0
- package/dist/src/importers/item-converter.d.ts +91 -0
- package/dist/src/importers/item-converter.d.ts.map +1 -0
- package/dist/src/importers/item-converter.js +221 -0
- package/dist/src/importers/item-converter.js.map +1 -0
- package/dist/src/importers/jira-importer.d.ts +42 -0
- package/dist/src/importers/jira-importer.d.ts.map +1 -0
- package/dist/src/importers/jira-importer.js +221 -0
- package/dist/src/importers/jira-importer.js.map +1 -0
- package/dist/src/init/repo/types.d.ts +2 -2
- package/dist/src/integrations/jira/jira-mapper.d.ts +1 -1
- package/dist/src/integrations/jira/jira-mapper.js +1 -1
- package/dist/src/living-docs/fs-id-allocator.d.ts +149 -0
- package/dist/src/living-docs/fs-id-allocator.d.ts.map +1 -0
- package/dist/src/living-docs/fs-id-allocator.js +325 -0
- package/dist/src/living-docs/fs-id-allocator.js.map +1 -0
- package/dist/src/living-docs/id-registry.d.ts +124 -0
- package/dist/src/living-docs/id-registry.d.ts.map +1 -0
- package/dist/src/living-docs/id-registry.js +230 -0
- package/dist/src/living-docs/id-registry.js.map +1 -0
- package/dist/src/progress/us-progress-tracker.d.ts +68 -0
- package/dist/src/progress/us-progress-tracker.d.ts.map +1 -0
- package/dist/src/progress/us-progress-tracker.js +120 -0
- package/dist/src/progress/us-progress-tracker.js.map +1 -0
- package/package.json +1 -1
- package/plugins/specweave/.claude-plugin/plugin.json +16 -2
- package/plugins/specweave/agents/architect/AGENT.md +11 -2
- package/plugins/specweave/agents/test-aware-planner/AGENT.md +81 -25
- package/plugins/specweave/commands/specweave-import-docs.md +278 -88
- package/plugins/specweave/commands/specweave-progress.md +45 -97
- package/plugins/specweave/hooks/post-increment-completion.sh +168 -26
- package/plugins/specweave/hooks/post-increment-planning.sh +148 -4
- package/plugins/specweave/hooks/post-task-completion.sh +64 -4
- package/plugins/specweave/lib/hooks/sync-cache.js +294 -0
- package/plugins/specweave/lib/hooks/sync-living-docs.js +32 -1
- package/plugins/specweave/lib/hooks/sync-us-tasks.js +23 -13
- package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-ado/lib/conflict-resolver.ts +1 -1
- package/plugins/specweave-alternatives/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-backend/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-confluent/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-docs/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-docs-preview/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-figma/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-frontend/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-github/hooks/post-task-completion.sh +37 -22
- package/plugins/specweave-github/lib/ThreeLayerSyncManager.ts +1 -1
- package/plugins/specweave-github/lib/enhanced-github-sync.js +1 -1
- package/plugins/specweave-github/lib/enhanced-github-sync.ts +1 -1
- package/plugins/specweave-github/lib/github-spec-content-sync.js +2 -1
- package/plugins/specweave-github/lib/github-spec-content-sync.ts +4 -1
- package/plugins/specweave-github/lib/github-spec-sync.js +1 -1
- package/plugins/specweave-github/lib/github-spec-sync.ts +1 -1
- package/plugins/specweave-github/lib/github-sync-bidirectional.js +1 -1
- package/plugins/specweave-github/lib/github-sync-bidirectional.ts +10 -1
- package/plugins/specweave-github/lib/progress-comment-builder.js +1 -1
- package/plugins/specweave-github/lib/progress-comment-builder.ts +2 -2
- package/plugins/specweave-github/lib/types.ts +1 -1
- package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kubernetes/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-ml/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-mobile/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-payments/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +252 -0
- package/plugins/specweave-testing/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-tooling/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-ui/.claude-plugin/plugin.json +1 -1
- package/src/templates/.env.example +5 -0
- package/src/templates/config-permissions-guide.md +413 -0
- package/src/templates/config.json.template +68 -0
- package/src/templates/tasks.md.template +180 -201
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Item Converter
|
|
3
|
+
*
|
|
4
|
+
* Converts external items (GitHub/JIRA/ADO) to SpecWeave living docs User Stories.
|
|
5
|
+
* CRITICAL: Does NOT create increments - only creates living docs.
|
|
6
|
+
*/
|
|
7
|
+
import fs from 'fs-extra';
|
|
8
|
+
import path from 'path';
|
|
9
|
+
/**
|
|
10
|
+
* Convert external items to living docs User Stories
|
|
11
|
+
*
|
|
12
|
+
* CRITICAL: This function ONLY creates living docs files.
|
|
13
|
+
* It does NOT create increments or populate .specweave/increments/.
|
|
14
|
+
*/
|
|
15
|
+
export class ItemConverter {
|
|
16
|
+
constructor(options) {
|
|
17
|
+
this.options = options;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Convert a single external item to a User Story with E suffix
|
|
21
|
+
*/
|
|
22
|
+
convertItem(item, usId) {
|
|
23
|
+
// Generate US-ID with E suffix
|
|
24
|
+
const id = `US-${String(usId).padStart(3, '0')}E`;
|
|
25
|
+
// Map external status to SpecWeave status
|
|
26
|
+
const status = this.mapStatus(item.status);
|
|
27
|
+
// Extract acceptance criteria
|
|
28
|
+
const acceptanceCriteria = item.acceptanceCriteria || [];
|
|
29
|
+
// Generate origin badge
|
|
30
|
+
const originBadge = this.generateOriginBadge(item);
|
|
31
|
+
// Generate markdown content for living docs
|
|
32
|
+
const markdown = this.generateMarkdown({
|
|
33
|
+
id,
|
|
34
|
+
title: item.title,
|
|
35
|
+
description: item.description,
|
|
36
|
+
acceptanceCriteria,
|
|
37
|
+
priority: item.priority,
|
|
38
|
+
status,
|
|
39
|
+
originBadge,
|
|
40
|
+
metadata: {
|
|
41
|
+
externalId: item.id,
|
|
42
|
+
externalUrl: item.url,
|
|
43
|
+
externalPlatform: item.platform,
|
|
44
|
+
importedAt: new Date().toISOString(),
|
|
45
|
+
createdAt: item.createdAt.toISOString(),
|
|
46
|
+
updatedAt: item.updatedAt.toISOString(),
|
|
47
|
+
labels: item.labels
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
// Generate file path
|
|
51
|
+
const fileName = this.generateFileName(id, item.title);
|
|
52
|
+
const filePath = path.join(this.options.specsDir, fileName);
|
|
53
|
+
return {
|
|
54
|
+
id,
|
|
55
|
+
title: item.title,
|
|
56
|
+
description: item.description,
|
|
57
|
+
acceptanceCriteria,
|
|
58
|
+
priority: item.priority,
|
|
59
|
+
status,
|
|
60
|
+
metadata: {
|
|
61
|
+
externalId: item.id,
|
|
62
|
+
externalUrl: item.url,
|
|
63
|
+
externalPlatform: item.platform,
|
|
64
|
+
importedAt: new Date().toISOString(),
|
|
65
|
+
createdAt: item.createdAt.toISOString(),
|
|
66
|
+
updatedAt: item.updatedAt.toISOString(),
|
|
67
|
+
labels: item.labels
|
|
68
|
+
},
|
|
69
|
+
filePath,
|
|
70
|
+
markdown
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Convert multiple external items to User Stories
|
|
75
|
+
*
|
|
76
|
+
* CRITICAL: This method ONLY creates living docs files.
|
|
77
|
+
* It does NOT create increments.
|
|
78
|
+
*/
|
|
79
|
+
async convertItems(items) {
|
|
80
|
+
const startingId = this.options.startingId || 1;
|
|
81
|
+
const converted = [];
|
|
82
|
+
// Ensure specs directory exists
|
|
83
|
+
fs.mkdirSync(this.options.specsDir, { recursive: true });
|
|
84
|
+
// Convert each item
|
|
85
|
+
for (let i = 0; i < items.length; i++) {
|
|
86
|
+
const item = items[i];
|
|
87
|
+
const usId = startingId + i;
|
|
88
|
+
const userStory = this.convertItem(item, usId);
|
|
89
|
+
converted.push(userStory);
|
|
90
|
+
// Write living docs file
|
|
91
|
+
fs.writeFileSync(userStory.filePath, userStory.markdown, 'utf-8');
|
|
92
|
+
}
|
|
93
|
+
return converted;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Map external status to SpecWeave status
|
|
97
|
+
*/
|
|
98
|
+
mapStatus(externalStatus) {
|
|
99
|
+
const statusMap = {
|
|
100
|
+
'open': 'Open',
|
|
101
|
+
'in-progress': 'In Progress',
|
|
102
|
+
'completed': 'Completed',
|
|
103
|
+
'closed': 'Completed'
|
|
104
|
+
};
|
|
105
|
+
return statusMap[externalStatus] || 'Open';
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Generate origin badge for living docs
|
|
109
|
+
*/
|
|
110
|
+
generateOriginBadge(item) {
|
|
111
|
+
const platformEmoji = {
|
|
112
|
+
'github': 'š',
|
|
113
|
+
'jira': 'š',
|
|
114
|
+
'ado': 'š'
|
|
115
|
+
};
|
|
116
|
+
const platformName = {
|
|
117
|
+
'github': 'GitHub',
|
|
118
|
+
'jira': 'JIRA',
|
|
119
|
+
'ado': 'Azure DevOps'
|
|
120
|
+
};
|
|
121
|
+
const emoji = platformEmoji[item.platform] || 'š';
|
|
122
|
+
const name = platformName[item.platform] || item.platform;
|
|
123
|
+
// Extract issue/ticket number from external ID
|
|
124
|
+
const issueNumber = item.id.replace(/^(GITHUB|JIRA|ADO)-/, '');
|
|
125
|
+
return `${emoji} [${name} #${issueNumber}](${item.url})`;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Generate markdown content for living docs User Story
|
|
129
|
+
*/
|
|
130
|
+
generateMarkdown(data) {
|
|
131
|
+
const parts = [];
|
|
132
|
+
// Title
|
|
133
|
+
parts.push(`# ${data.id}: ${data.title}`);
|
|
134
|
+
parts.push('');
|
|
135
|
+
// Origin badge
|
|
136
|
+
parts.push(`**Origin**: ${data.originBadge}`);
|
|
137
|
+
parts.push('');
|
|
138
|
+
// Status and Priority
|
|
139
|
+
parts.push(`**Status**: ${data.status}`);
|
|
140
|
+
if (data.priority) {
|
|
141
|
+
parts.push(`**Priority**: ${data.priority}`);
|
|
142
|
+
}
|
|
143
|
+
parts.push('');
|
|
144
|
+
// Description
|
|
145
|
+
parts.push('## Description');
|
|
146
|
+
parts.push('');
|
|
147
|
+
parts.push(data.description || 'No description provided.');
|
|
148
|
+
parts.push('');
|
|
149
|
+
// Acceptance Criteria
|
|
150
|
+
if (data.acceptanceCriteria.length > 0) {
|
|
151
|
+
parts.push('## Acceptance Criteria');
|
|
152
|
+
parts.push('');
|
|
153
|
+
data.acceptanceCriteria.forEach((ac, index) => {
|
|
154
|
+
const acId = `AC-${data.id.replace('E', '')}-${String(index + 1).padStart(2, '0')}`;
|
|
155
|
+
parts.push(`- [ ] **${acId}**: ${ac}`);
|
|
156
|
+
});
|
|
157
|
+
parts.push('');
|
|
158
|
+
}
|
|
159
|
+
// Tasks
|
|
160
|
+
parts.push('## Tasks');
|
|
161
|
+
parts.push('');
|
|
162
|
+
parts.push('> **Note**: This User Story was imported from an external tool.');
|
|
163
|
+
parts.push('> Create tasks manually when ready to implement.');
|
|
164
|
+
parts.push('');
|
|
165
|
+
// Metadata (frontmatter-style at bottom)
|
|
166
|
+
parts.push('---');
|
|
167
|
+
parts.push('');
|
|
168
|
+
parts.push('## External Metadata');
|
|
169
|
+
parts.push('');
|
|
170
|
+
parts.push(`- **External ID**: ${data.metadata.externalId}`);
|
|
171
|
+
parts.push(`- **External URL**: ${data.metadata.externalUrl}`);
|
|
172
|
+
parts.push(`- **Platform**: ${data.metadata.externalPlatform}`);
|
|
173
|
+
parts.push(`- **Imported At**: ${data.metadata.importedAt}`);
|
|
174
|
+
parts.push(`- **Created At**: ${data.metadata.createdAt}`);
|
|
175
|
+
parts.push(`- **Updated At**: ${data.metadata.updatedAt}`);
|
|
176
|
+
if (data.metadata.labels.length > 0) {
|
|
177
|
+
parts.push(`- **Labels**: ${data.metadata.labels.join(', ')}`);
|
|
178
|
+
}
|
|
179
|
+
return parts.join('\n');
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Generate file name for living docs User Story
|
|
183
|
+
*
|
|
184
|
+
* Format: us-001e-title-here.md
|
|
185
|
+
*/
|
|
186
|
+
generateFileName(usId, title) {
|
|
187
|
+
// Convert US-001E to us-001e
|
|
188
|
+
const idPart = usId.toLowerCase();
|
|
189
|
+
// Convert title to kebab-case
|
|
190
|
+
const titlePart = title
|
|
191
|
+
.toLowerCase()
|
|
192
|
+
.replace(/[^a-z0-9\s-]/g, '') // Remove special chars
|
|
193
|
+
.replace(/\s+/g, '-') // Replace spaces with hyphens
|
|
194
|
+
.replace(/-+/g, '-') // Remove duplicate hyphens
|
|
195
|
+
.slice(0, 50); // Limit to 50 chars
|
|
196
|
+
return `${idPart}-${titlePart}.md`;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Validate that no increments were created
|
|
200
|
+
*
|
|
201
|
+
* CRITICAL: This validation ensures we're not auto-creating increments.
|
|
202
|
+
*/
|
|
203
|
+
static validateNoIncrementsCreated(projectRoot) {
|
|
204
|
+
const incrementsDir = path.join(projectRoot, '.specweave', 'increments');
|
|
205
|
+
if (!fs.existsSync(incrementsDir)) {
|
|
206
|
+
return; // No increments directory - that's fine
|
|
207
|
+
}
|
|
208
|
+
// Check for any numbered increment directories
|
|
209
|
+
const items = fs.readdirSync(incrementsDir);
|
|
210
|
+
const incrementDirs = items.filter(item => {
|
|
211
|
+
const fullPath = path.join(incrementsDir, item);
|
|
212
|
+
return fs.statSync(fullPath).isDirectory() && /^\d{4}-/.test(item);
|
|
213
|
+
});
|
|
214
|
+
if (incrementDirs.length > 0) {
|
|
215
|
+
throw new Error(`VALIDATION FAILED: Increments were auto-created during import. ` +
|
|
216
|
+
`Found: ${incrementDirs.join(', ')}. ` +
|
|
217
|
+
`Import should ONLY create living docs, not increments.`);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=item-converter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item-converter.js","sourceRoot":"","sources":["../../../src/importers/item-converter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAwDxB;;;;;GAKG;AACH,MAAM,OAAO,aAAa;IAGxB,YAAY,OAA6B;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,IAAkB,EAAE,IAAY;QAC1C,+BAA+B;QAC/B,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC;QAElD,0CAA0C;QAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAE3C,8BAA8B;QAC9B,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,IAAI,EAAE,CAAC;QAEzD,wBAAwB;QACxB,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AK,EAAE,GAAG,CAAC,CAAW,2BAA2B;aACzD,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAiB,oBAAoB;QAErD,OAAO,GAAG,MAAM,IAAI,SAAS,KAAK,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,2BAA2B,CAAC,WAAmB;QACpD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;QAEzE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;YAClC,OAAO,CAAC,wCAAwC;QAClD,CAAC;QAED,+CAA+C;QAC/C,MAAM,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;QAC5C,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;YACxC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;YAChD,OAAO,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;QAEH,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CACb,iEAAiE;gBACjE,UAAU,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;gBACtC,wDAAwD,CACzD,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JIRA Importer
|
|
3
|
+
*
|
|
4
|
+
* Imports JIRA issues/epics as External Items with JQL support and pagination.
|
|
5
|
+
* Handles authentication and converts JIRA-specific data to platform-agnostic format.
|
|
6
|
+
*/
|
|
7
|
+
import type { Importer, ExternalItem, ImportConfig } from './external-importer.js';
|
|
8
|
+
/**
|
|
9
|
+
* JIRA Importer Implementation
|
|
10
|
+
*/
|
|
11
|
+
export declare class JiraImporter implements Importer {
|
|
12
|
+
readonly platform: "jira";
|
|
13
|
+
private host;
|
|
14
|
+
private email;
|
|
15
|
+
private apiToken;
|
|
16
|
+
constructor(host: string, email?: string, apiToken?: string);
|
|
17
|
+
/**
|
|
18
|
+
* Import all issues matching config
|
|
19
|
+
*/
|
|
20
|
+
import(config?: ImportConfig): Promise<ExternalItem[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Paginate through issues using JQL (50 per page)
|
|
23
|
+
*/
|
|
24
|
+
paginate(config?: ImportConfig): AsyncGenerator<ExternalItem[], void, unknown>;
|
|
25
|
+
/**
|
|
26
|
+
* Make authenticated JIRA API request
|
|
27
|
+
*/
|
|
28
|
+
private makeJiraRequest;
|
|
29
|
+
/**
|
|
30
|
+
* Convert JIRA issue to ExternalItem
|
|
31
|
+
*/
|
|
32
|
+
private convertToExternalItem;
|
|
33
|
+
/**
|
|
34
|
+
* Extract acceptance criteria from description
|
|
35
|
+
* Looks for patterns like:
|
|
36
|
+
* - AC1: ...
|
|
37
|
+
* - Acceptance Criteria:
|
|
38
|
+
* - Given/When/Then
|
|
39
|
+
*/
|
|
40
|
+
private extractAcceptanceCriteria;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=jira-importer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jira-importer.d.ts","sourceRoot":"","sources":["../../../src/importers/jira-importer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AA0CnF;;GAEG;AACH,qBAAa,YAAa,YAAW,QAAQ;IAC3C,QAAQ,CAAC,QAAQ,EAAG,MAAM,CAAU;IACpC,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,QAAQ,CAAS;gBAEb,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAY3D;;OAEG;IACG,MAAM,CAAC,MAAM,GAAE,YAAiB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAUhE;;OAEG;IACI,QAAQ,CAAC,MAAM,GAAE,YAAiB,GAAG,cAAc,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC;IA0FzF;;OAEG;YACW,eAAe;IAgC7B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAyD7B;;;;;;OAMG;IACH,OAAO,CAAC,yBAAyB;CA2BlC"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JIRA Importer
|
|
3
|
+
*
|
|
4
|
+
* Imports JIRA issues/epics as External Items with JQL support and pagination.
|
|
5
|
+
* Handles authentication and converts JIRA-specific data to platform-agnostic format.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* JIRA Importer Implementation
|
|
9
|
+
*/
|
|
10
|
+
export class JiraImporter {
|
|
11
|
+
constructor(host, email, apiToken) {
|
|
12
|
+
this.platform = 'jira';
|
|
13
|
+
this.host = host.replace(/\/+$/, ''); // Remove trailing slashes
|
|
14
|
+
this.email = email || process.env.JIRA_EMAIL || '';
|
|
15
|
+
this.apiToken = apiToken || process.env.JIRA_API_TOKEN || '';
|
|
16
|
+
if (!this.email || !this.apiToken) {
|
|
17
|
+
throw new Error('JIRA authentication required: Set JIRA_EMAIL and JIRA_API_TOKEN environment variables');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Import all issues matching config
|
|
22
|
+
*/
|
|
23
|
+
async import(config = {}) {
|
|
24
|
+
const items = [];
|
|
25
|
+
for await (const page of this.paginate(config)) {
|
|
26
|
+
items.push(...page);
|
|
27
|
+
}
|
|
28
|
+
return items;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Paginate through issues using JQL (50 per page)
|
|
32
|
+
*/
|
|
33
|
+
async *paginate(config = {}) {
|
|
34
|
+
const { timeRangeMonths = 3, includeClosed = false, labels = [], milestone, // JIRA uses "fixVersion" or "epic"
|
|
35
|
+
maxItems = Infinity, } = config;
|
|
36
|
+
// Build JQL query
|
|
37
|
+
const jqlParts = [];
|
|
38
|
+
// Time range
|
|
39
|
+
const since = new Date();
|
|
40
|
+
since.setMonth(since.getMonth() - timeRangeMonths);
|
|
41
|
+
jqlParts.push(`created >= "${since.toISOString().split('T')[0]}"`);
|
|
42
|
+
// Status filter
|
|
43
|
+
if (!includeClosed) {
|
|
44
|
+
jqlParts.push('statusCategory != Done');
|
|
45
|
+
}
|
|
46
|
+
// Labels filter
|
|
47
|
+
if (labels.length > 0) {
|
|
48
|
+
const labelsCondition = labels.map((l) => `labels = "${l}"`).join(' OR ');
|
|
49
|
+
jqlParts.push(`(${labelsCondition})`);
|
|
50
|
+
}
|
|
51
|
+
// Epic/Milestone filter (assuming epic link custom field)
|
|
52
|
+
if (milestone) {
|
|
53
|
+
jqlParts.push(`"Epic Link" = "${milestone}"`);
|
|
54
|
+
}
|
|
55
|
+
const jql = jqlParts.join(' AND ');
|
|
56
|
+
let startAt = 0;
|
|
57
|
+
const maxResults = 50; // JIRA pagination size
|
|
58
|
+
let totalFetched = 0;
|
|
59
|
+
while (totalFetched < maxItems) {
|
|
60
|
+
try {
|
|
61
|
+
// Fetch page from JIRA API
|
|
62
|
+
const response = await this.makeJiraRequest('/rest/api/3/search', {
|
|
63
|
+
jql,
|
|
64
|
+
startAt,
|
|
65
|
+
maxResults,
|
|
66
|
+
fields: [
|
|
67
|
+
'summary',
|
|
68
|
+
'description',
|
|
69
|
+
'status',
|
|
70
|
+
'priority',
|
|
71
|
+
'issuetype',
|
|
72
|
+
'created',
|
|
73
|
+
'updated',
|
|
74
|
+
'labels',
|
|
75
|
+
'customfield_10016', // Story points
|
|
76
|
+
'subtasks',
|
|
77
|
+
'parent',
|
|
78
|
+
],
|
|
79
|
+
});
|
|
80
|
+
// Convert JIRA issues to ExternalItems
|
|
81
|
+
const items = response.issues.map((issue) => this.convertToExternalItem(issue));
|
|
82
|
+
// Yield page
|
|
83
|
+
if (items.length > 0) {
|
|
84
|
+
yield items.slice(0, maxItems - totalFetched);
|
|
85
|
+
totalFetched += items.length;
|
|
86
|
+
}
|
|
87
|
+
// Check if we've reached the end
|
|
88
|
+
if (startAt + maxResults >= response.total) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
startAt += maxResults;
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
if (error.status === 401) {
|
|
95
|
+
throw new Error(`JIRA authentication failed: ${error.message}`);
|
|
96
|
+
}
|
|
97
|
+
else if (error.status === 403) {
|
|
98
|
+
throw new Error(`JIRA access forbidden: ${error.message}`);
|
|
99
|
+
}
|
|
100
|
+
throw error;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Make authenticated JIRA API request
|
|
106
|
+
*/
|
|
107
|
+
async makeJiraRequest(endpoint, params = {}) {
|
|
108
|
+
const url = new URL(endpoint, this.host);
|
|
109
|
+
// Add query params
|
|
110
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
111
|
+
if (value !== undefined && value !== null) {
|
|
112
|
+
url.searchParams.append(key, typeof value === 'object' ? JSON.stringify(value) : String(value));
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
// Create Basic Auth header
|
|
116
|
+
const auth = Buffer.from(`${this.email}:${this.apiToken}`).toString('base64');
|
|
117
|
+
const response = await fetch(url.toString(), {
|
|
118
|
+
method: 'GET',
|
|
119
|
+
headers: {
|
|
120
|
+
'Authorization': `Basic ${auth}`,
|
|
121
|
+
'Accept': 'application/json',
|
|
122
|
+
'Content-Type': 'application/json',
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
if (!response.ok) {
|
|
126
|
+
const errorText = await response.text();
|
|
127
|
+
const error = new Error(`JIRA API error: ${response.statusText} - ${errorText}`);
|
|
128
|
+
error.status = response.status;
|
|
129
|
+
throw error;
|
|
130
|
+
}
|
|
131
|
+
return response.json();
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Convert JIRA issue to ExternalItem
|
|
135
|
+
*/
|
|
136
|
+
convertToExternalItem(issue) {
|
|
137
|
+
// Map JIRA issue type to ExternalItem type
|
|
138
|
+
let type = 'task';
|
|
139
|
+
const issueTypeName = issue.fields.issuetype.name.toLowerCase();
|
|
140
|
+
if (issueTypeName.includes('story') || issueTypeName === 'user story') {
|
|
141
|
+
type = 'user-story';
|
|
142
|
+
}
|
|
143
|
+
else if (issueTypeName === 'epic') {
|
|
144
|
+
type = 'epic';
|
|
145
|
+
}
|
|
146
|
+
else if (issueTypeName === 'bug') {
|
|
147
|
+
type = 'bug';
|
|
148
|
+
}
|
|
149
|
+
else if (issueTypeName === 'feature') {
|
|
150
|
+
type = 'feature';
|
|
151
|
+
}
|
|
152
|
+
// Map JIRA priority to ExternalItem priority
|
|
153
|
+
const priorityMap = {
|
|
154
|
+
'highest': 'P0',
|
|
155
|
+
'high': 'P1',
|
|
156
|
+
'medium': 'P2',
|
|
157
|
+
'low': 'P3',
|
|
158
|
+
'lowest': 'P4',
|
|
159
|
+
};
|
|
160
|
+
const priority = issue.fields.priority
|
|
161
|
+
? priorityMap[issue.fields.priority.name.toLowerCase()]
|
|
162
|
+
: undefined;
|
|
163
|
+
// Extract acceptance criteria from description
|
|
164
|
+
const acceptanceCriteria = this.extractAcceptanceCriteria(issue.fields.description || '');
|
|
165
|
+
// Map JIRA status category to ExternalItem status
|
|
166
|
+
let status = 'open';
|
|
167
|
+
const statusCategory = issue.fields.status.statusCategory.key;
|
|
168
|
+
if (statusCategory === 'indeterminate') {
|
|
169
|
+
status = 'in-progress';
|
|
170
|
+
}
|
|
171
|
+
else if (statusCategory === 'done') {
|
|
172
|
+
status = 'completed';
|
|
173
|
+
}
|
|
174
|
+
return {
|
|
175
|
+
id: `JIRA-${issue.key}`,
|
|
176
|
+
type,
|
|
177
|
+
title: issue.fields.summary,
|
|
178
|
+
description: issue.fields.description || '',
|
|
179
|
+
status,
|
|
180
|
+
priority,
|
|
181
|
+
createdAt: new Date(issue.fields.created),
|
|
182
|
+
updatedAt: new Date(issue.fields.updated),
|
|
183
|
+
url: `${this.host}/browse/${issue.key}`,
|
|
184
|
+
labels: issue.fields.labels,
|
|
185
|
+
acceptanceCriteria,
|
|
186
|
+
parentId: issue.fields.parent ? `JIRA-${issue.fields.parent.key}` : undefined,
|
|
187
|
+
platform: 'jira',
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Extract acceptance criteria from description
|
|
192
|
+
* Looks for patterns like:
|
|
193
|
+
* - AC1: ...
|
|
194
|
+
* - Acceptance Criteria:
|
|
195
|
+
* - Given/When/Then
|
|
196
|
+
*/
|
|
197
|
+
extractAcceptanceCriteria(description) {
|
|
198
|
+
const criteria = [];
|
|
199
|
+
// Pattern 1: AC1:, AC2:, etc.
|
|
200
|
+
const acPattern = /AC\d+:\s*(.+)/gi;
|
|
201
|
+
let match;
|
|
202
|
+
while ((match = acPattern.exec(description)) !== null) {
|
|
203
|
+
criteria.push(match[1].trim());
|
|
204
|
+
}
|
|
205
|
+
// Pattern 2: Bullet points under "Acceptance Criteria:" heading
|
|
206
|
+
const acSectionMatch = description.match(/Acceptance Criteria:?\s*\n([\s\S]*?)(?:\n\n|\n#|$)/i);
|
|
207
|
+
if (acSectionMatch) {
|
|
208
|
+
const bullets = acSectionMatch[1].match(/^[\s*-]\s*(.+)/gm);
|
|
209
|
+
if (bullets) {
|
|
210
|
+
criteria.push(...bullets.map((b) => b.replace(/^[\s*-]\s*/, '').trim()));
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
// Pattern 3: Given/When/Then format
|
|
214
|
+
const gwtPattern = /Given\s+(.+?)\s+When\s+(.+?)\s+Then\s+(.+)/gi;
|
|
215
|
+
while ((match = gwtPattern.exec(description)) !== null) {
|
|
216
|
+
criteria.push(`Given ${match[1]} When ${match[2]} Then ${match[3]}`);
|
|
217
|
+
}
|
|
218
|
+
return criteria.length > 0 ? criteria : undefined;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=jira-importer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jira-importer.js","sourceRoot":"","sources":["../../../src/importers/jira-importer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4CH;;GAEG;AACH,MAAM,OAAO,YAAY;IAMvB,YAAY,IAAY,EAAE,KAAc,EAAE,QAAiB;QALlD,aAAQ,GAAG,MAAe,CAAC;QAMlC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,0BAA0B;QAChE,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC;QACnD,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC;QAE7D,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CACb,uFAAuF,CACxF,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,SAAuB,EAAE;QACpC,MAAM,KAAK,GAAmB,EAAE,CAAC;QAEjC,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/C,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QACtB,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,CAAC,QAAQ,CAAC,SAA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CAAC;QACjC,CAAC;QAED,gEAAgE;QAChE,MAAM,cAAc,GAAG,WAAW,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;QAChG,IAAI,cAAc,EAAE,CAAC;YACnB,MAAM,OAAO,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;YAC5D,IAAI,OAAO,EAAE,CAAC;gBACZ,QAAQ,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YAC3E,CAAC;QACH,CAAC;QAED,oCAAoC;QACpC,MAAM,UAAU,GAAG,8CAA8C,CAAC;QAClE,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACvD,QAAQ,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACvE,CAAC;QAED,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAgB,CAAC;IAC3D,CAAC;CACF"}
|
|
@@ -77,9 +77,9 @@ export declare const RepositoryMetadataSchema: z.ZodObject<{
|
|
|
77
77
|
language?: string;
|
|
78
78
|
owner?: string;
|
|
79
79
|
url?: string;
|
|
80
|
+
lastUpdated?: Date;
|
|
80
81
|
private?: boolean;
|
|
81
82
|
stars?: number;
|
|
82
|
-
lastUpdated?: Date;
|
|
83
83
|
defaultBranch?: string;
|
|
84
84
|
}, {
|
|
85
85
|
name?: string;
|
|
@@ -87,9 +87,9 @@ export declare const RepositoryMetadataSchema: z.ZodObject<{
|
|
|
87
87
|
language?: string;
|
|
88
88
|
owner?: string;
|
|
89
89
|
url?: string;
|
|
90
|
+
lastUpdated?: Date;
|
|
90
91
|
private?: boolean;
|
|
91
92
|
stars?: number;
|
|
92
|
-
lastUpdated?: Date;
|
|
93
93
|
defaultBranch?: string;
|
|
94
94
|
}>;
|
|
95
95
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -81,7 +81,7 @@ export declare class JiraMapper {
|
|
|
81
81
|
*/
|
|
82
82
|
exportIncrementAsEpic(incrementId: string, projectKey: string): Promise<SyncResult>;
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
84
|
+
* Three-permission sync between SpecWeave Increment and Jira Epic
|
|
85
85
|
*/
|
|
86
86
|
syncIncrement(incrementId: string): Promise<SyncResult>;
|
|
87
87
|
private getNextIncrementId;
|
|
@@ -188,7 +188,7 @@ export class JiraMapper {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
191
|
-
*
|
|
191
|
+
* Three-permission sync between SpecWeave Increment and Jira Epic
|
|
192
192
|
*/
|
|
193
193
|
async syncIncrement(incrementId) {
|
|
194
194
|
console.log(`\nš Syncing Increment ${incrementId} with Jira...`);
|