Skip to content

Test "resolve conflicts" even when the PR is not checked out #5939

Closed

Description

@alexr00

Refs: #5802

Complexity: 5

Create Issue


To test, you'll need a PR with some merge conflicts. If you have some real-world merge conflicts (ex. an old PR that you have left setting around for a while, or some lucky, more current, merger conflicts) please do use those for testing! If you use real-world merge conflicts, you might want to make a back up of your PR branch just in case something goes wrong. If you don't have any merge conflicts, you can quickly create some:

  • Checkout the branch that you want to make a PR into (this is your base branch)
  • Note what lines the most recent couple commits touch
  • Go a couple commits back by doing git checkout <a few commits old sha>
  • Create your PR branch by doing git checkout -b <your new branch name>
  • Make a commit on your PR branch that modifies some of the lines that you noted above.
  • Make a PR from your PR branch to the original branch.

Steps to get to the "resolve conflicts" flow:

  • Install the pre-release version of GitHub Pull Requests
  • Set "githubPullRequests.experimentalUpdateBranchWithGitHub": true
  • Desktop testers: Do not have the PR branch with conflicts checked out. Checkout any other branch.
  • Find and expand your PR in the "Pull Requests" view. If you can't easily find it there, you can add a new query to the view using the "..." menu in the view.
  • Open the PR description and scroll down to the checks. You should see a "Resolve conflicts" button.

Things to verify:

Note: please see the known issues!

  • Renames are not allowed to be resolved using this feature.
  • Only files that were modified in both the base branch and the PR branch show in the "Conflict resolution" view.
  • You can figure out how to resolve conflicts using the "Conflict resolution" view.
  • You can figure out how to exit conflict resolution and delete all your changes.
  • You can tell when you've resolved all the conflicts.
  • You can understand what you're looking at when you click on a file that you've already resolved the conflicts for.
  • You can figure out how to "submit" all your resolutions and make your merge commit to the PR branch.
  • After you've completed and committed your conflict resolutions, go back through all the changes in the PR and make sure they are correct.

Known issues:

  • Files without merge conflicts but that were modified in both the base and PR branches will show in the "Conflict resolution" view.
  • Only works for PR branches where 300 or fewer files have changed between the PR branch and the base branch current head.

Activity

  1. deepak1556 commented on Apr 23, 2024

    @deepak1556

    Doesn't seem to work on web as expected #5940, Alex Ross (@alexr00) is looking into it for unblocking testing.

  2. alexr00 commented on Apr 23, 2024

    @alexr00
    MemberAuthor

    Testing is only blocked for PRs where more than 300 files have changed between the PR branch and the base branch head. I don't see a good way around this to unblock for testing this case, so please limit testing to PR branches that have 300 or fewer files that have changed between the PR branch head and the base branch head.

  3. removed their assignment
    on Apr 23, 2024
  4. Tyriar commented on Apr 23, 2024

    @Tyriar
    Contributor

    Throughout my testing on real world PRs I was not able to actually resolve any conflicts due to #5945 and no able to commit resolutions due to #5953

    Maybe that's because all my PRs have > 300 files changed, not sure. Better error messages for the above would be helpful

  5. removed their assignment
    on Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions