简体   繁体   English

拉取请求基础分支更新后如何重新运行 Github Actions 工作流程

[英]How to rerun Github Actions workflow when the pull request base branch updated

Is it possible to trigger Github Actions workflow when the base branch of the pull request has new code pushed?当 pull request 的基础分支有新代码推送时,是否可以触发 Github Actions 工作流程?

Details with example: the pull request branch is feature1 and the base is development, so is it possible to trigger workflow on PR for feature1 branch when the development branch updated with new code after the PR opened?详细示例:pull request 分支是 feature1,base 是 development,那么当 PR 打开后 development 分支更新了新代码时,是否可以在 feature1 分支上触发 PR 上的工作流?

There is not currently a trigger that would allow you do this.目前没有允许您执行此操作的触发器。 However, there is a feature of GitHub's branch protection rule intended to solve this problem: When selecting to "Require Status Checks to pass before merging" there is the additional option to "Require branches to be up to date before merging".但是,GitHub的分支保护规则有一个特征,旨在解决此问题:选择“需要状态检查之前要通过之前”合并时,还有一个其他选项可以“要求分支在合并之前是最新的”。 This setting will block merges if commits from the base branch are not merged back into feature branches.如果来自基本分支的提交未合并回功能分支,则此设置将阻止合并。 As a consequence users will be forced to "update" their branch which will result in a "push" event to their branch thus triggering the workflows.结果,用户将被迫“更新”他们的分支,这将导致“推送”事件到他们的分支,从而触发工作流。

RequireBranchesBeUpToDate RequireBranchesBeUpToDate

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Github 操作设置工作流时,会针对“pull_request”事件过滤哪个分支? - Which branch is filtered on for `pull_request` events when setting up a workflow using Github Actions? 在 Github 操作工作流中的拉取请求上获取基本分支 SHA - Getting base branch SHA on pull request in Github Action Workflow 如何在 GitHub Actions 工作流程中获取拉取请求编号 - How to get pull request number within GitHub Actions workflow Github 操作:寻找对拉取请求事件和工作流调度事件均可见的分支级别属性 - Github actions: Seeking a branch level property that is visible to both pull request events and workflow dispatch events 有没有办法强制 Github 操作在来自分支的拉取请求触发器中使用主分支工作流文件? - Is there a way to force Github actions use main branch workflow files in a pull request trigger from a fork? 在 Github 上更改拉取请求的基本分支时将删除哪些提交? - What commits will be removed when changing the base branch of a pull request on Github? Github 对拉取请求和主分支的操作 - Github actions on pull request and master branch 打开拉取请求或更新 PR 分支时,如何运行 GitHub 操作? - How to run a GitHub Action when a pull request is opened or the PR branch is updated? 如何 git 使用 github 操作工作流程拉原点 - How to git pull origin with github Actions workflow 以编程方式更改github pull请求的基本分支 - Programmatically change base branch for a github pull request
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM