edsger 0.6.9 → 0.6.10

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.
@@ -31,4 +31,4 @@ export declare function createPullRequest(config: PullRequestConfig, feature: Fe
31
31
  /**
32
32
  * Update feature with pull request URL via MCP
33
33
  */
34
- export declare function updateFeatureWithPullRequest(featureId: string, pullRequestUrl: string, verbose?: boolean): Promise<boolean>;
34
+ export declare function updateFeatureWithPullRequest(featureId: string, pullRequestUrl: string, verbose?: boolean, status?: string): Promise<boolean>;
@@ -230,7 +230,7 @@ export async function createPullRequest(config, feature) {
230
230
  /**
231
231
  * Update feature with pull request URL via MCP
232
232
  */
233
- export async function updateFeatureWithPullRequest(featureId, pullRequestUrl, verbose) {
233
+ export async function updateFeatureWithPullRequest(featureId, pullRequestUrl, verbose, status = 'pull_request') {
234
234
  const maxRetries = 3;
235
235
  let lastError = null;
236
236
  const mcpServerUrl = process.env.EDSGER_MCP_SERVER_URL;
@@ -238,7 +238,7 @@ export async function updateFeatureWithPullRequest(featureId, pullRequestUrl, ve
238
238
  for (let attempt = 1; attempt <= maxRetries; attempt++) {
239
239
  try {
240
240
  if (verbose) {
241
- console.log(`📊 Updating feature ${featureId} with PR URL: ${pullRequestUrl} (Attempt ${attempt}/${maxRetries})`);
241
+ console.log(`📊 Updating feature ${featureId} with PR URL: ${pullRequestUrl}, status: ${status} (Attempt ${attempt}/${maxRetries})`);
242
242
  }
243
243
  const requestBody = {
244
244
  jsonrpc: '2.0',
@@ -246,7 +246,7 @@ export async function updateFeatureWithPullRequest(featureId, pullRequestUrl, ve
246
246
  params: {
247
247
  feature_id: featureId,
248
248
  pull_request_url: pullRequestUrl,
249
- status: 'ready_for_review',
249
+ status,
250
250
  },
251
251
  id: Math.random().toString(36).substring(7),
252
252
  };
@@ -47,6 +47,13 @@ export async function handlePullRequestCreation({ featureId, results, testingRes
47
47
  console.log(`â„šī¸ Pull request already exists: ${feature.pull_request_url}`);
48
48
  console.log('✅ Skipping PR creation, using existing pull request');
49
49
  }
50
+ // Update feature status to pull_request if not already
51
+ if (feature.status !== 'pull_request') {
52
+ if (verbose) {
53
+ console.log(`📊 Updating feature status from ${feature.status} to pull_request`);
54
+ }
55
+ await updateFeatureWithPullRequest(featureId, feature.pull_request_url, verbose, 'pull_request');
56
+ }
50
57
  // Log phase completion with existing PR
51
58
  await logFeaturePhaseEvent({
52
59
  featureId,
@@ -57,6 +64,8 @@ export async function handlePullRequestCreation({ featureId, results, testingRes
57
64
  pull_request_url: feature.pull_request_url,
58
65
  skipped: true,
59
66
  reason: 'Pull request already exists',
67
+ status_updated: feature.status !== 'pull_request',
68
+ previous_status: feature.status,
60
69
  timestamp: new Date().toISOString(),
61
70
  },
62
71
  }, verbose);
@@ -107,7 +116,7 @@ export async function handlePullRequestCreation({ featureId, results, testingRes
107
116
  });
108
117
  if (prResult.success && prResult.pullRequestUrl) {
109
118
  // Update feature with PR URL and status
110
- await updateFeatureWithPullRequest(featureId, prResult.pullRequestUrl, verbose);
119
+ await updateFeatureWithPullRequest(featureId, prResult.pullRequestUrl, verbose, 'pull_request');
111
120
  // Log phase completion
112
121
  await logFeaturePhaseEvent({
113
122
  featureId,
@@ -121,7 +130,7 @@ export async function handlePullRequestCreation({ featureId, results, testingRes
121
130
  },
122
131
  }, verbose);
123
132
  if (verbose) {
124
- console.log(`✅ Pull request created and feature updated to ready_for_review`);
133
+ console.log(`✅ Pull request created and feature updated to pull_request status`);
125
134
  }
126
135
  return true;
127
136
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edsger",
3
- "version": "0.6.9",
3
+ "version": "0.6.10",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "edsger": "dist/index.js"