Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.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

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 API保护Github分支_Git_Github_Github Api - Fatal编程技术网

使用Github API保护Github分支

使用Github API保护Github分支,git,github,github-api,Git,Github,Github Api,我对Github API真的很陌生 我必须创建一个脚本(shell/Groovy),该脚本可以一次性启用对多个repo分支的保护,以便只有授权用户可以访问它。 虽然我已经阅读了,但是我不太清楚如何实现它。实际的API是“” 使用带有的,我们可以看看你目前的代码吗,看看你在哪里卡住了?如果您目前没有任何代码,最好进行部分尝试,以便读者可以看到问题所在。 PUT /repos/:owner/:repo/branches/:branch/protection

我对Github API真的很陌生

我必须创建一个脚本(shell/Groovy),该脚本可以一次性启用对多个repo分支的保护,以便只有授权用户可以访问它。 虽然我已经阅读了,但是我不太清楚如何实现它。

实际的API是“”


使用带有

的,我们可以看看你目前的代码吗,看看你在哪里卡住了?如果您目前没有任何代码,最好进行部分尝试,以便读者可以看到问题所在。
PUT /repos/:owner/:repo/branches/:branch/protection