You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(amber): Push to existing PR instead of creating duplicates
When an issue already has an open PR, Amber now:
- Detects the existing PR via gh pr list search
- Checks out the existing branch instead of creating a new one
- Pushes additional commits to the existing PR
- Adds comments to both PR and issue about the update
This prevents duplicate PRs like ambient-code#450, ambient-code#442, ambient-code#441, ambient-code#438.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
? `- Review that changes match the issue description\n- Verify no scope creep or unintended modifications\n- Changes pushed to existing PR #${existingPrNumber}`
362
+
: `- Review that changes match the issue description\n- Verify no scope creep or unintended modifications\n- A PR will be created shortly for formal review`;
363
+
315
364
await github.rest.issues.createComment({
316
365
owner: context.repo.owner,
317
366
repo: context.repo.repo,
318
367
issue_number: issueNumber,
319
-
body: `## Amber Change Summary\n\nThe following files were modified:\n\n\`\`\`\n${diff}\n\`\`\`\n\n**Next Steps:**\n- Review that changes match the issue description\n- Verify no scope creep or unintended modifications\n- A PR will be created shortly for formal review\n\n---\n🔍 [View AI decision process](${serverUrl}/${repository}/actions/runs/${runId}) (logs available for 90 days)`
368
+
body: `## Amber Change Summary\n\nThe following files were modified:\n\n\`\`\`\n${diff}\n\`\`\`\n\n**Next Steps:**\n${nextSteps}\n\n---\n🔍 [View AI decision process](${serverUrl}/${repository}/actions/runs/${runId}) (logs available for 90 days)`
New changes have been pushed to this PR. Please review the updated code.
440
+
441
+
---
442
+
🔍 [View AI decision process](${serverUrl}/${repository}/actions/runs/${runId}) (logs available for 90 days)`
443
+
});
444
+
445
+
// Also notify on the issue
446
+
await github.rest.issues.createComment({
447
+
owner: context.repo.owner,
448
+
repo: context.repo.repo,
449
+
issue_number: issueNumber,
450
+
body: `🤖 Amber pushed additional changes to the existing PR #${existingPrNumber}.\n\n---\n🔍 [View AI decision process](${serverUrl}/${repository}/actions/runs/${runId}) (logs available for 90 days)`
0 commit comments