edsger 0.5.0 → 0.5.2
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.
|
@@ -36,11 +36,31 @@ export const getStatusForPhase = (phase) => {
|
|
|
36
36
|
switch (phase) {
|
|
37
37
|
case 'feature-analysis':
|
|
38
38
|
return 'feature_analysis';
|
|
39
|
+
case 'feature-analysis-verification':
|
|
40
|
+
return 'feature_analysis_verification';
|
|
39
41
|
case 'technical-design':
|
|
40
42
|
return 'technical_design';
|
|
43
|
+
case 'technical-design-verification':
|
|
44
|
+
return 'technical_design_verification';
|
|
41
45
|
case 'code-implementation':
|
|
42
46
|
return 'code_implementation';
|
|
47
|
+
case 'code-implementation-verification':
|
|
48
|
+
return 'code_implementation_verification';
|
|
49
|
+
case 'code-refine':
|
|
50
|
+
return 'code_refine';
|
|
51
|
+
case 'code-refine-verification':
|
|
52
|
+
return 'code_refine_verification';
|
|
53
|
+
case 'bug-fixing':
|
|
54
|
+
return 'bug_fixing';
|
|
55
|
+
case 'code-review':
|
|
56
|
+
return 'code_review';
|
|
57
|
+
case 'pull-request':
|
|
58
|
+
return 'pull_request';
|
|
43
59
|
case 'functional-testing':
|
|
60
|
+
return 'functional_testing';
|
|
61
|
+
case 'deployment':
|
|
62
|
+
return 'deployment';
|
|
63
|
+
case 'testing-in-progress':
|
|
44
64
|
return 'testing_in_progress';
|
|
45
65
|
case 'testing-passed':
|
|
46
66
|
return 'testing_passed';
|
|
@@ -151,12 +151,13 @@ export const reviewPullRequest = async (options, config) => {
|
|
|
151
151
|
// Create GitHub review with comments
|
|
152
152
|
if (structuredReviewResult) {
|
|
153
153
|
const { summary, comments, overall_assessment } = structuredReviewResult;
|
|
154
|
+
// Initialize Octokit
|
|
155
|
+
const octokit = new Octokit({ auth: githubToken });
|
|
154
156
|
if (!comments || comments.length === 0) {
|
|
155
157
|
if (verbose) {
|
|
156
158
|
logInfo('✅ No issues found. PR looks good!');
|
|
157
159
|
}
|
|
158
160
|
// Create an approval review if no issues found
|
|
159
|
-
const octokit = new Octokit({ auth: githubToken });
|
|
160
161
|
const review = await octokit.pulls.createReview({
|
|
161
162
|
owner: context.owner,
|
|
162
163
|
repo: context.repo,
|
|
@@ -179,9 +180,7 @@ export const reviewPullRequest = async (options, config) => {
|
|
|
179
180
|
if (verbose) {
|
|
180
181
|
logInfo(`Creating GitHub review with ${comments.length} comments...`);
|
|
181
182
|
}
|
|
182
|
-
//
|
|
183
|
-
const octokit = new Octokit({ auth: githubToken });
|
|
184
|
-
// Create review with REQUEST_CHANGES
|
|
183
|
+
// Create review with inline comments
|
|
185
184
|
const reviewComments = comments.map((comment) => ({
|
|
186
185
|
path: comment.file || comment.path,
|
|
187
186
|
line: comment.line,
|
|
@@ -191,7 +190,7 @@ export const reviewPullRequest = async (options, config) => {
|
|
|
191
190
|
owner: context.owner,
|
|
192
191
|
repo: context.repo,
|
|
193
192
|
pull_number: context.pullRequestNumber,
|
|
194
|
-
event: '
|
|
193
|
+
event: 'COMMENT',
|
|
195
194
|
body: summary ||
|
|
196
195
|
overall_assessment ||
|
|
197
196
|
'Please address the following review comments.',
|
package/dist/types/index.d.ts
CHANGED
|
@@ -124,4 +124,4 @@ export interface FeatureAnalysisDisplayResult {
|
|
|
124
124
|
createdUserStories?: DisplayUserStory[];
|
|
125
125
|
createdTestCases?: DisplayTestCase[];
|
|
126
126
|
}
|
|
127
|
-
export type FeatureStatus = 'backlog' | 'ready_for_dev' | 'feature_analysis' | 'technical_design' | 'code_implementation' | 'code_review' | 'ready_for_review' | 'shipped' | 'testing_in_progress' | 'testing_passed' | 'testing_failed';
|
|
127
|
+
export type FeatureStatus = 'backlog' | 'ready_for_dev' | 'feature_analysis' | 'feature_analysis_verification' | 'technical_design' | 'technical_design_verification' | 'code_implementation' | 'code_implementation_verification' | 'code_refine' | 'code_refine_verification' | 'bug_fixing' | 'code_review' | 'pull_request' | 'functional_testing' | 'ready_for_review' | 'shipped' | 'deployment' | 'testing_in_progress' | 'testing_passed' | 'testing_failed';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pipeline runner for executing development workflow phases
|
|
3
|
-
*
|
|
3
|
+
* Complete pipeline flow:
|
|
4
|
+
* feature-analysis → technical-design → code-implementation →
|
|
5
|
+
* functional-testing → pull-request → code-review → code-refine → code-refine-verification
|
|
4
6
|
* Uses functional programming principles
|
|
5
7
|
*/
|
|
6
8
|
import { EdsgerConfig } from '../types/index.js';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pipeline runner for executing development workflow phases
|
|
3
|
-
*
|
|
3
|
+
* Complete pipeline flow:
|
|
4
|
+
* feature-analysis → technical-design → code-implementation →
|
|
5
|
+
* functional-testing → pull-request → code-review → code-refine → code-refine-verification
|
|
4
6
|
* Uses functional programming principles
|
|
5
7
|
*/
|
|
6
8
|
import { updateFeatureStatusForPhase } from '../api/features/index.js';
|
|
@@ -160,6 +162,8 @@ const runFromFeatureAnalysis = async (options, config) => {
|
|
|
160
162
|
testingResult,
|
|
161
163
|
verbose,
|
|
162
164
|
});
|
|
165
|
+
// Continue with code review and refine workflow
|
|
166
|
+
await continueWithCodeReviewAndRefine(options, config, results, verbose);
|
|
163
167
|
}
|
|
164
168
|
return logPipelineComplete(results, verbose);
|
|
165
169
|
};
|
|
@@ -202,6 +206,8 @@ const runFromTechnicalDesign = async (options, config) => {
|
|
|
202
206
|
testingResult,
|
|
203
207
|
verbose,
|
|
204
208
|
});
|
|
209
|
+
// Continue with code review and refine workflow
|
|
210
|
+
await continueWithCodeReviewAndRefine(options, config, results, verbose);
|
|
205
211
|
}
|
|
206
212
|
return logPipelineComplete(results, verbose);
|
|
207
213
|
};
|
|
@@ -238,6 +244,8 @@ const runFromCodeImplementation = async (options, config) => {
|
|
|
238
244
|
testingResult,
|
|
239
245
|
verbose,
|
|
240
246
|
});
|
|
247
|
+
// Continue with code review and refine workflow
|
|
248
|
+
await continueWithCodeReviewAndRefine(options, config, results, verbose);
|
|
241
249
|
}
|
|
242
250
|
return logPipelineComplete(results, verbose);
|
|
243
251
|
};
|
|
@@ -268,6 +276,8 @@ const runFromFunctionalTesting = async (options, config) => {
|
|
|
268
276
|
testingResult,
|
|
269
277
|
verbose,
|
|
270
278
|
});
|
|
279
|
+
// Continue with code review and refine workflow
|
|
280
|
+
await continueWithCodeReviewAndRefine(options, config, results, verbose);
|
|
271
281
|
}
|
|
272
282
|
return logPipelineComplete(results, verbose);
|
|
273
283
|
};
|
|
@@ -322,3 +332,25 @@ const runFromCodeReview = async (options, config) => {
|
|
|
322
332
|
});
|
|
323
333
|
return logPipelineComplete(results, verbose);
|
|
324
334
|
};
|
|
335
|
+
/**
|
|
336
|
+
* Continue with code review and refine after PR creation
|
|
337
|
+
* This is the post-PR workflow: code-review → code-refine → code-refine-verification
|
|
338
|
+
*/
|
|
339
|
+
const continueWithCodeReviewAndRefine = async (options, config, results, verbose) => {
|
|
340
|
+
if (verbose) {
|
|
341
|
+
console.log('\n🔄 Continuing with code review and refine workflow...');
|
|
342
|
+
}
|
|
343
|
+
// 1. Code Review - analyze PR and create review comments
|
|
344
|
+
const reviewResult = await runCodeReviewPhase(options, config);
|
|
345
|
+
results.push(logPhaseResult(reviewResult, verbose));
|
|
346
|
+
if (!shouldContinuePipeline(results)) {
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
// 2. Code Refine with automatic retry for verification failures
|
|
350
|
+
await handleCodeRefineWithRetry({
|
|
351
|
+
options,
|
|
352
|
+
config,
|
|
353
|
+
results,
|
|
354
|
+
verbose,
|
|
355
|
+
});
|
|
356
|
+
};
|