microsoft / microsoft/vscode-pull-request-github

Selecting Revert Selected Ranges in Github pull request plane seems weird

Open
#3,567 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
TypeScript
Stars
2.6k
Forks
795
Avg merge
1d 4h
Merged PRs (30d)
46

Description

  • Extension version:0.42.0
  • VSCode Version: 1.67.2
  • OS: m1 mac pro

Seems like clicking 'Revert Selected Ranges' in github pull request plane works unexpectedly.

Steps to Reproduce:

  1. Check out my PR
  2. Go to Github Pull Request plane
  3. Select any file under 'CHANGES IN PULL REQUEST'; a diff view appears.
  4. Drag some changes, right click, select
    Unstage Selected Ranges -> no-op. I think it is reasonable since we didn't stage anything. However, when we select
    Revert Selected Ranges -> The file is messed up; some changes are duplicated and randomly placed.

At first, I expected Revert Selected Ranges to revert selected changes of the current file to what it looked like before the PR, but it didn't work. Is the behavior intended, or am I missing something?

If that is intended or not designed to use like this, is there a way to easily revert-some-selected-range-from-this-PR while staying on the 'diff' view? As a workaround, I manually git reset each file, revert the ranges that I don't want (in the diff view given by 'Source Control'), and re-stage the file.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in the GitHub Pull Request pane using the listed steps, then compare Revert Selected Ranges with the Source Control diff workflow. The payload names no source file or test; done means selected ranges no longer produce duplicated or randomly placed changes, or the behavior is clearly documented as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github, typescript, vscode
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.