从叉子到父存储库的堆叠拉动请求

发布于 2025-02-09 04:22:26 字数 894 浏览 2 评论 0原文

堆叠拉动请求当从叉子到父仓库的PR时,使用模式?

我经常使用此模式,当我们需要将大型功能分为小型可审查的PRS时。在一个回购中,它只需要在子分支之间进行PRS,这很简单。但是,当我想在存储库之间创建PR时,我找不到如何实现此目标。

例如,我想创建一个修复时间轴组件的表顺序的PR,但是此更改取决于修复侧向箭头和菜单按钮的关注性的PR。在单个存储库中,我将具有这样的PRS依赖关系结构:

  1. master< - sideways-fix
  2. sideways-fix< - 菜单框架
  3. 菜单>菜单fix< - tabbing-fix

,但是交叉repo pr允许我仅选择master分支作为目标。这导致拥有3个PR:

  1. Master< - 侧向框架
  2. master< - 菜单框架
  3. master< - tabbing-fix

最后一个PR重叠了上面的2个PR的变化使其更大,更难审查。

How can the Stacked Pull Requests pattern be used when doing PRs from the fork to the parent repo?

I use this pattern often when we need to split a large feature into small reviewable PRs. In one repo it just requires doing PRs between sub-branches which is quite simple. But I wasn't able to find how to implement this when I want to create a PR between repos.

For example, I want to create a PR that fixes the tabbing order of the Timeline component, but this change depends on the PRs that fix the sideways arrows and menu buttons' focusability. In single repo I would have such PRs dependencies structure:

  1. master <- sideways-fix
  2. sideways-fix <- menu-fix
  3. menu-fix <- tabbing-fix

But the cross-repo PR allows me to only select the master branch as the target. This leads to having the 3 PRs:

  1. master <- sideways-fix
  2. master <- menu-fix
  3. master <- tabbing-fix

And the last PR overlaps the changes from the 2 PRs above which makes it larger and harder to review.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

┈┾☆殇 2025-02-16 04:22:26

虽然不直接支持这一点,但自2021年10月以来,https://github.blog/changelog/2021-10-27-pull-request-request-merge-queue-limited-beta/” “ nofollow noreferrer”>拉动请求合并队列有限β正在进行中(现在,2023年2月,GA:一般可用性)。

更多的是验证与“准备合并”并行确定为“准备合并”的不同组合,以便拉动请求可以有效合并,而没有当今合并之间存在的典型延迟。

因此,不完全是您的用例,而是关闭的,因为您不必在合并PR之前重新重新使用PR。

在客户端,您有 cape> cape lylyze/pr-train可以提供帮助:

git PR培训可帮助您管理PR链时,当您需要将长PR分为较小的PR时。

如果您有一系列PR,则git pr-train

确保链中的所有分支都在修改任何一个分支机构时都会更新
用目录

为您创建github prs

While this is not directly supported, there is since Oct. 2021 a Pull Request Merge Queue Limited Beta in progress (now, Feb. 2023, in GA: General Availability).

It is more to validating different combinations of pull requests identified as “ready to merge” in parallel so that pull requests can merge efficiently and without the typical delays that exist between merges today.

So, not exactly your use case, but close, since you don't have to rebase a PR before it can be merged.

On the client side, you have realyze/pr-train which can help:

git pr-train helps you manage your PR chain when you need split a long PR into smaller ones.

If you have a chain of PRs, git pr-train:

Makes sure all your branches in the chain get updated when you modify any of them
Creates GitHub PRs for you with a table of contents

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文