claude-autopm 1.11.3 → 1.11.5

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.
@@ -278,21 +278,65 @@ class ReleaseManager {
278
278
  console.log('📝 Updating CHANGELOG.md...');
279
279
  this.updateChangelog(changelogEntry);
280
280
 
281
+ // Create release branch
282
+ console.log('🌿 Creating release branch...');
283
+ const releaseBranch = `release/v${newVersion}`;
284
+ this.execCommand(`git checkout -b ${releaseBranch}`);
285
+
281
286
  // Commit changes
282
287
  console.log('📤 Committing changes...');
283
288
  this.execCommand('git add package.json CHANGELOG.md');
284
289
  this.execCommand(`git commit -m "chore: release v${newVersion}"`);
285
290
 
286
- // Create tag
287
- console.log('🏷️ Creating tag...');
288
- const tagMessage = `Release v${newVersion}\n\n${changelogEntry}`;
289
- this.execCommand(`git tag -a v${newVersion} -m "${tagMessage.replace(/"/g, '\\"')}"`);
290
-
291
- // Push if not disabled
291
+ // Push branch and create PR if not disabled
292
292
  if (!options.noPush) {
293
293
  console.log('📤 Pushing to remote...');
294
- this.execCommand('git push');
295
- this.execCommand('git push --tags');
294
+ this.execCommand(`git push -u origin ${releaseBranch}`);
295
+
296
+ // Create PR using gh CLI
297
+ try {
298
+ this.execCommand('which gh', { ignoreError: false });
299
+ console.log('📦 Creating Pull Request...');
300
+ const prBody = `## Release v${newVersion}\n\n${changelogEntry}`;
301
+ const prUrl = this.execCommand(
302
+ `gh pr create --title "chore: release v${newVersion}" --body "${prBody.replace(/"/g, '\\"')}" --base main`
303
+ );
304
+ console.log(`✅ Pull Request created: ${prUrl}`);
305
+
306
+ // Auto-merge the PR
307
+ const prNumber = prUrl.split('/').pop();
308
+ console.log('🔄 Auto-merging PR...');
309
+ this.execCommand(`gh pr merge ${prNumber} --squash --auto`);
310
+
311
+ // Wait for merge and create tag
312
+ console.log('⏳ Waiting for PR to merge...');
313
+ let merged = false;
314
+ for (let i = 0; i < 30; i++) {
315
+ await new Promise(resolve => setTimeout(resolve, 2000));
316
+ const status = this.execCommand(`gh pr view ${prNumber} --json state -q .state`, { ignoreError: true });
317
+ if (status === 'MERGED') {
318
+ merged = true;
319
+ break;
320
+ }
321
+ }
322
+
323
+ if (merged) {
324
+ // Switch back to main and pull
325
+ console.log('📥 Updating main branch...');
326
+ this.execCommand('git checkout main');
327
+ this.execCommand('git pull origin main');
328
+
329
+ // Create tag
330
+ console.log('🏷️ Creating tag...');
331
+ const tagMessage = `Release v${newVersion}\n\n${changelogEntry}`;
332
+ this.execCommand(`git tag -a v${newVersion} -m "${tagMessage.replace(/"/g, '\\"')}"`);
333
+ this.execCommand('git push --tags');
334
+ } else {
335
+ console.log('⚠️ PR not merged yet. Please merge manually and create tag.');
336
+ }
337
+ } catch {
338
+ console.log('⚠️ GitHub CLI not available. Please create PR manually.');
339
+ }
296
340
  }
297
341
 
298
342
  // Create GitHub release if gh CLI is available
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-autopm",
3
- "version": "1.11.3",
3
+ "version": "1.11.5",
4
4
  "description": "Autonomous Project Management Framework for Claude Code - Advanced AI-powered development automation",
5
5
  "main": "bin/autopm.js",
6
6
  "bin": {