- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我可以让 Github 在创建评论时自动将一组人添加到评论中吗?
理想情况下,我想创建一组人,并且只有在该组中至少有一个人接受了更改时才能合并。
这群人将是该领域的中小企业。其他审稿人可以评论和接受,但只有至少有一个 SME 接受了更改,才能合并 PR。
是否可以在不使用钩子(Hook)的情况下在 Github 中做到这一点?
最佳答案
是的,您可以在没有 webhook 的情况下完成所有这些操作!
审批组
关于设置“审批组”的问题,可以使用 CODEOWNERS
文件来设置它。
来自 the Github docs (强调我的):
Use a CODEOWNERS file to define individuals or teams that are responsible for code in a repository.
Code owners are automatically requested for review when someone opens a pull request that modifies code that they own. When someone with admin permissions has enabled required reviews, they can optionally require approval from a code owner.
CODEOWNERS
的格式文件类似于
.gitignore
,但在每个范围旁边都有 Github 用户名。使用与
.gitignore
相同的规则定义范围。文件。
CODEOWNERS
文件,请参阅此答案的末尾。)
Repository administrators can require that all pull requests receive at least one approved review from someone with write or admin permissions or from a designated code owner before they're merged into a protected branch.
When required reviews are enabled, anyone with access to the repository can approve changes in a pull request. However, to merge your pull request you need someone who has write or admin permissions in the repository to approve your pull request's changes in their review. If review is required from a designated code owner and the pull request affects code that has a designated owner, approval from that owner is required.
# This is a comment.
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @global-owner1 @global-owner2
# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
# modifies JS files, only @js-owner and not the global
# owner(s) will be requested for a review.
*.js @js-owner
# You can also use email addresses if you prefer. They'll be
# used to look up users just like we do for commit author
# emails.
*.go docs@example.com
# In this example, @doctocat owns any files in the build/logs
# directory at the root of the repository and any of its
# subdirectories.
/build/logs/ @doctocat
# The `docs/*` pattern will match files like
# `docs/getting-started.md` but not further nested files like
# `docs/build-app/troubleshooting.md`.
docs/* docs@example.com
# In this example, @octocat owns any file in an apps directory
# anywhere in your repository.
apps/ @octocat
# In this example, @doctocat owns any file in the `/docs`
# directory in the root of your repository.
/docs/ @doctocat
关于Github 群评,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45806336/
我是一名优秀的程序员,十分优秀!