gpt4 book ai didi

jenkins - 在 GitHub 中,我如何授予应用程序权限以提交到具有保护的分支?

转载 作者:行者123 更新时间:2023-12-05 02:46:49 26 4
gpt4 key购买 nike

我有一个应用程序,我想在 CI 构建期间升级版本。我正在尝试使用应用凭据将版本回退,但出现以下错误:

+ git push origin HEAD:master
remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: At least 1 approving review is required by reviewers with write access.

现在,当我使用自己的凭据执行此操作时,它可以正常工作,因为我是存储库中的管理员,但是尽管有通常的分支保护,我如何授予对应用程序的访问权限以推送到 master?

最佳答案

您可以(现在,2022 年 5 月,18 个月后)。

Consistently allow GitHub Apps as exceptions to branch protection rules

Previously, some branch protections only allowed exceptions to be granted to users and teams.
Now, GitHub Apps can also be granted exceptions to any branch protection that supports exceptions.

Admins can create branch protection rules to enforce certain workflows for branches, such as requiring a pull request before changes can be merged to a branch.

This is a good practice, but you may want to make exceptions to a rule for specific people, teams, or GitHub Apps.
For example, if you have a GitHub App that calls GitHub APIs to make changes in a repository, you may want to permit that App to make changes without creating a pull request.

Previously, these exceptions could be granted to people and teams, but only some protections allowed GitHub Apps.

Now, branch protections that previously only allowed exceptions for people and teams also support GitHub Apps.
When admins configure these branch protections, they can choose from a list of GitHub Apps that are installed and authorized for the repository, as shown here:

Image of adding a GitHub App as an exception to a branch protection setting -- https://i0.wp.com/user-images.githubusercontent.com/1767415/168915626-eaccb112-d95f-4828-bbfd-317844aa6cda.png?ssl=1

(Image of adding a GitHub App as an exception to a branch protection setting)

For information about branch protection rules, visit Managing a branch protection rule.

For information about GitHub Apps, visit About GitHub Apps.

关于jenkins - 在 GitHub 中,我如何授予应用程序权限以提交到具有保护的分支?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65348124/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com