Handle merge conflicts with manual resolution workflow#8
Conversation
When a PR has a conflict that requires manual resolution: 1. The action adds the 'autorestack-needs-conflict-resolution' label 2. User manually resolves the conflict and pushes 3. The push triggers a 'synchronize' event 4. The workflow detects the label and triggers the continuation job 5. The action removes the label, posts confirmation, and updates child PRs This ensures the PR stack continues to be updated even after manual intervention is required.
Document the automatic continuation feature after manual conflict resolution, including the updated workflow configuration with the synchronize trigger and continuation job.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ALL_CHILDREN+=("$CHILD_BRANCH") | ||
| update_branch_recursive "$CHILD_BRANCH" |
There was a problem hiding this comment.
Guard recursive update when SQUASH_COMMIT is undefined
In the conflict-resolved workflow, SQUASH_COMMIT is never initialized (git update-ref SQUASH_COMMIT ... only happens in main()), and on a synchronize event github.event.pull_request.merge_commit_sha is typically empty. When update_branch_recursive runs for grandchildren, it calls update_indirect_target → skip_if_clean, which executes git merge-base --is-ancestor SQUASH_COMMIT ... and fails with “invalid object name” because the ref does not exist. This makes the continuation path crash for stacks with depth >1, so dependent PRs beyond the immediate children won’t be updated after manual resolution.
Useful? React with 👍 / 👎.
|
Codex Review: Didn't find any major issues. Keep them coming! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
When a PR has a conflict that requires manual resolution:
This ensures the PR stack continues to be updated even after manual intervention is required.