GitHub已推出Stacked Pull Requests功能的公开预览版,现正向所有仓库逐步推出[1]。这一功能将大型代码变更分解为多个小的、有序的可审查拉取请求,使团队能够并行审查和独立合并各层次的变更[1]。Merge queue对Stacked PRs的支持将在未来几周内逐步推出[1]。
业界开发者对该功能的实际应用表示认可。NextJS主要开发者Tim Neutkens表示:"我们过去几个月一直在Next.js中使用GitHub stacked PRs。它帮助我们在交付更大功能的同时引入更小的单个变更,使PR审查更容易"[1]。jQuery创始人John Resig评价称:"新的Github Stacked PRs预览令人难以置信。一次性将5个stacked PRs直接发送到merge queue!"[1]。TED的首席技术官Andy Merryman指出,通过将大型变更分解为小的、依赖排序的部分,审查能够以更小的逻辑块进行,"不仅更快的PR审查,而且更准确"[1]。
用户可通过命令行扩展进行安装:运行gh extension install github/gh-stack[1]。
GitHub has introduced Stacked Pull Requests into public preview, rolling out the capability to all repositories [1]. This feature breaks down large code changes into multiple smaller, ordered pull requests that teams can review and merge independently in parallel [1].
The company is addressing a common challenge in software development where reviewing large pull requests becomes difficult and time-consuming. By decomposing substantial changes into manageable, logically dependent layers, developers can conduct more thorough reviews on smaller chunks of code, resulting in faster and more accurate assessments [1]. Support for Stacked PRs within the merge queue will be gradually rolled out over the coming weeks [1].
The feature has already garnered positive feedback from notable developers. Tim Neutkens, lead of Next.js at Vercel, noted that his team has been using GitHub Stacked PRs for the past several months, stating: "It helps us ship smaller individual changes while delivering larger features, making PR review easier" [1]. John Resig, founder of jQuery, expressed enthusiasm about the new capability, saying: "The new Github Stacked PRs preview is incredible. Sending 5 stacked PRs directly to merge queue at once!" [1]. Andy Merryman, CTO of TED, highlighted the organizational benefits: "By breaking down large changes into small, dependency-ordered pieces, review happens on smaller logical blocks, resulting in not only faster PR review, but more accurate ones" [1].
Users can begin using Stacked PRs by installing the CLI extension through the command gh extension install github/gh-stack [1].