microsoft / microsoft/vscode-pull-request-github

Support using `pushRemote` and `merge` to detect the PR of a branch

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

还没有人认领这个 Issue。

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

描述

My branches are set up like this (a triangle workflow, but with just one remote):

[branch "feature1"]
	pushRemote = origin
	remote = origin
	merge = refs/heads/master
[branch "feature2-using-feature1"]
	pushRemote = origin
	remote = origin
	merge = refs/heads/feature1

Currently it seems like this plugin is matching the "merge" setting of the branches against the "from" setting of the PR to decide which branch should be checked-out for a PR. However this results in feature2-using-feature1 being associated with feature1's PR.

I couldn't find a setting to make this work. I'm working around it by going into .git/config and manually updating the vscode-merge-base and github-pr-owner-number settings for each branch, but it would be great if there's some way to configure this plugin so that PRs can be associated with branches based on the pushRemote setting and matching names of the local branches with those on the pushRemote (https://git-scm.com/docs/git-config#Documentation/git-config.txt-branchnamepushRemote)

贡献指南

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

从这里开始

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

调研方向

未指定任何文件或测试。首先定位 branch 与 PR 的关联逻辑,并跟踪 branch merge 设置如何与 PR 的 from branch 进行匹配。将该行为与 Git 的 pushRemote 和本地 branch 名称进行比较;当 triangle 工作流无需手动编辑 .git/config 就能将每个 PR 关联到预期的本地 branch 时,即表示完成。

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

评估

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

把新 issue 发到你的邮箱

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