Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在GitHub上触发Google云构建ref/pull/*/merge分支事件_Git_Github_Google Cloud Platform_Google Cloud Build - Fatal编程技术网

如何在GitHub上触发Google云构建ref/pull/*/merge分支事件

如何在GitHub上触发Google云构建ref/pull/*/merge分支事件,git,github,google-cloud-platform,google-cloud-build,Git,Github,Google Cloud Platform,Google Cloud Build,据我所知,有两种方式可以触发GitHub回购上的谷歌云构建: 所有拉取请求都是自动生成的 定义一个触发器,然后在分支更改时运行 未合并的GitHub pull请求有2个参考,如下所示: $ git ls-remote From git@github.com:user/repo 1680161331c0a0ebcf59fb1ef2f4dbe27b857418 HEAD 9e1d427bfcd97d8ac2eda7661cc8a21da2355d19 refs/heads/if_deps

据我所知,有两种方式可以触发GitHub回购上的谷歌云构建:

  • 所有拉取请求都是自动生成的
  • 定义一个触发器,然后在分支更改时运行
  • 未合并的GitHub pull请求有2个参考,如下所示:

    $ git ls-remote
    From git@github.com:user/repo
    1680161331c0a0ebcf59fb1ef2f4dbe27b857418    HEAD
    9e1d427bfcd97d8ac2eda7661cc8a21da2355d19    refs/heads/if_deps
    ee8328eb1e5fa38c9cc39c86d8b0896c9eaec73c    refs/heads/mcmc-fixes
    1680161331c0a0ebcf59fb1ef2f4dbe27b857418    refs/heads/master
    94d3a40412aff060a2a820d164dfd52050cac192    refs/pull/1/head
    9e1d427bfcd97d8ac2eda7661cc8a21da2355d19    refs/pull/2/head
    ccb44a8c12ed9d79e76551e7876892c9e87de032    refs/pull/2/merge
    ee8328eb1e5fa38c9cc39c86d8b0896c9eaec73c    refs/pull/3/head
    f9928f924698042939008e8526094662b7f44125    refs/pull/3/merge
    
    • PR#1已合并,只有
      refs/pull/1/head
    • PRs#2和#3尚未合并,
      refs/pull/2/merge
    不幸的是,自动拉请求触发器只构建
    refs/pull/*/head
    ref,而不是
    refs/pull/*/merge
    ref。更重要的是构建
    refs/pull/*/merge
    ,以证明拉请求可以安全地合并到master中

    因此,我试图定义一个触发器来运行
    refs/pull/*/merge

    据我所知,Google Cloud Build触发器只匹配形式为
    refs/heads/
    的GitHub refs,但:


    refs/pull/*/merge
    分支发生更改时,是否可能触发生成?

    我也对其进行了测试,确实没有为
    refs/pull/*/merge触发生成

    关于这一点有一个很好的解释,所以它可能会在将来得到实现