microsoft / microsoft/vscode-pull-request-github

Selecting Revert Selected Ranges in Github pull request plane seems weird

未关闭
#3,567 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

feature-request
主要语言
TypeScript
星标
2.6k
派生
796
平均合并
1 天 4 小时
30 天内合并 PR
46

描述

  • 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.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,按照列出的步骤在 GitHub Pull Request 窗格中重现该问题,然后将 Revert Selected Ranges 与 Source Control diff 工作流进行比较。Payload 未指定源文件或测试;当所选范围不再产生重复或随机放置的更改,或者该行为被明确记录为预期行为时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
git, github, typescript, vscode
领域
developer-experience, devtools
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。