Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict resolution draft_commit_conflicts provides incorrect instructions #421

Closed
korthout opened this issue May 28, 2024 · 0 comments · Fixed by #422 or #423
Closed

Conflict resolution draft_commit_conflicts provides incorrect instructions #421

korthout opened this issue May 28, 2024 · 0 comments · Fixed by #422 or #423
Labels
bug Something isn't working

Comments

@korthout
Copy link
Owner

korthout commented May 28, 2024

Describe the bug

The instructions to resolve the conflicts for draft pull requests are not correct:

Example:

git fetch origin stable/8.2
git worktree add -d .worktree/backport-18860-to-stable/8.2 origin/stable/8.2
cd .worktree/backport-18860-to-stable/8.2
git switch backport-18860-to-stable/8.2
git reset --hard HEAD^
git cherry-pick -x c2fbff443d734c9ed1a63fd0f3205b116b89ba38 55de7bf4ee62a549e1e83a78097903151210bd6e
git push --force-with-lease

This instructs to checkout origin/stable/8.2 and then switch to backport-18860-to-stable/8.2, but without fetching backport-18860-to-stable/8.2 this will fail.

To Reproduce
Steps to reproduce the behavior:

  1. Set conflict_resolution to draft_commit_conflicts
  2. Create and merge a pull request that results in a conflicts when backporting
  3. Trigger the backport workflow
  4. Notice the draft pull request with incorrect instructions.

Expected behavior
We should propose the following instructions:

git fetch origin <backportbranch>
git worktree add --checkout .worktree/<backportbranch> <backportbranch>
cd .worktree/<backportbranch>
git reset --hard HEAD^
git cherry-pick -x <commits>
git push --force-with-lease

Examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant