edsger 0.9.2 ā 0.9.3
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.
|
@@ -127,6 +127,7 @@ const runOnlyTechnicalDesign = async (options, config) => {
|
|
|
127
127
|
};
|
|
128
128
|
/**
|
|
129
129
|
* Run only code implementation phase
|
|
130
|
+
* After successful implementation, creates a pull request so the code can be reviewed
|
|
130
131
|
*/
|
|
131
132
|
const runOnlyCodeImplementation = async (options, config) => {
|
|
132
133
|
const { featureId, verbose } = options;
|
|
@@ -134,6 +135,29 @@ const runOnlyCodeImplementation = async (options, config) => {
|
|
|
134
135
|
const results = [];
|
|
135
136
|
const implementationResult = await runCodeImplementationPhase(options, config);
|
|
136
137
|
results.push(logPhaseResult(implementationResult, verbose));
|
|
138
|
+
// If implementation succeeded, create a pull request so the code can be reviewed
|
|
139
|
+
if (implementationResult.status === 'success') {
|
|
140
|
+
if (verbose) {
|
|
141
|
+
logInfo('\nš Creating pull request for implemented code...');
|
|
142
|
+
}
|
|
143
|
+
const prCreated = await handlePullRequestCreation({
|
|
144
|
+
featureId,
|
|
145
|
+
results,
|
|
146
|
+
// No testingResult - functional testing was skipped
|
|
147
|
+
verbose,
|
|
148
|
+
});
|
|
149
|
+
// Add PR creation result to results array
|
|
150
|
+
const prResult = {
|
|
151
|
+
featureId,
|
|
152
|
+
phase: 'pull-request',
|
|
153
|
+
status: prCreated ? 'success' : 'error',
|
|
154
|
+
message: prCreated
|
|
155
|
+
? 'Pull request created successfully'
|
|
156
|
+
: 'Pull request creation failed',
|
|
157
|
+
data: {},
|
|
158
|
+
};
|
|
159
|
+
results.push(logPhaseResult(prResult, verbose));
|
|
160
|
+
}
|
|
137
161
|
return finalizePipelineExecution(options, results, verbose);
|
|
138
162
|
};
|
|
139
163
|
/**
|
|
@@ -109,10 +109,14 @@ export async function handlePullRequestCreation({ featureId, results, testingRes
|
|
|
109
109
|
name: feature.name,
|
|
110
110
|
description: feature.description || '',
|
|
111
111
|
productId: feature.product_id,
|
|
112
|
-
// Get technical design and test result from previous phases
|
|
112
|
+
// Get technical design and test result from previous phases (if available)
|
|
113
113
|
technicalDesign: results.find((r) => r.phase === 'technical-design')?.data?.technicalDesign,
|
|
114
|
-
testResult: testingResult
|
|
115
|
-
|
|
114
|
+
testResult: testingResult
|
|
115
|
+
? testingResult.data?.testResult
|
|
116
|
+
: undefined,
|
|
117
|
+
testReportUrl: testingResult
|
|
118
|
+
? testingResult.data?.testReport?.testReportUrl
|
|
119
|
+
: undefined,
|
|
116
120
|
});
|
|
117
121
|
if (prResult.success && prResult.pullRequestUrl) {
|
|
118
122
|
// Update feature with PR URL and status
|