Skip to content

Commit 62f6824

Browse files
authored
fix(workflows): push branch before creating PR in Amber workflow (#383)
## Fix Adds step after Claude Code execution to ensure branch exists on remote before PR creation. ## Problem The workflow was trying to create a PR using a branch that hadn't been pushed to the remote yet, causing: ``` Validation Failed: {"resource":"PullRequest","field":"head","code":"invalid"} ``` ## Solution - Added "Push branch to remote" step after changes are detected - Runs before PR creation step - Uses `git push -u origin $BRANCH_NAME` 🤖 Generated with Claude Code
1 parent 6c85216 commit 62f6824

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/amber-issue-handler.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,14 @@ jobs:
235235
echo "Changes committed on branch $BRANCH_NAME (commit: ${COMMIT_SHA:0:7})"
236236
fi
237237
238+
- name: Push branch to remote
239+
if: steps.check-changes.outputs.has_changes == 'true'
240+
env:
241+
BRANCH_NAME: ${{ steps.check-changes.outputs.branch_name }}
242+
run: |
243+
git push -u origin "$BRANCH_NAME"
244+
echo "Pushed branch $BRANCH_NAME to remote"
245+
238246
- name: Validate changes align with issue intent
239247
if: steps.check-changes.outputs.has_changes == 'true'
240248
env:

0 commit comments

Comments
 (0)