Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/reusable-codex-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,26 @@ jobs:
path: .workflows-lib
token: ${{ steps.auth_token.outputs.checkout_token }}


# Surface merge conflicts before Codex runs
# When action='conflict', we need to attempt the merge BEFORE invoking Codex
# so that conflicts are visible in the workspace. Otherwise Codex checks
# git status, sees no conflicts (because merge hasn't been attempted yet),
# and exits early despite prompt instructions to run the merge.
- name: Surface merge conflicts
if: inputs.prompt_file == '.github/codex/prompts/fix_merge_conflicts.md'
run: |
set +e # Don't exit on merge failure - conflicts are expected
git fetch origin main
git merge --no-commit --no-ff origin/main
Comment thread
stranske marked this conversation as resolved.
Outdated
Comment thread
stranske marked this conversation as resolved.
Outdated
merge_exit=$?
if [ $merge_exit -ne 0 ]; then
echo "Merge conflicts detected (expected for conflict resolution)"
git status
else
echo "No merge conflicts - merge succeeded automatically"
fi
set -e
Comment thread
stranske marked this conversation as resolved.
Outdated
- name: Set up Python
uses: actions/setup-python@v6
with:
Expand Down
Loading