And*_*son 5 pull-request dependabot github-codeowners
我们使用代码所有者文件自动将评论分配给拉取请求。我们还让 Dependabot 为主要版本创建 PR。
我们不想自动向 Dependabot 创建的 PR 添加评论。根据https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-syntax,不可能!使用排除。
有没有办法:
谢谢!
我已阅读 Codeowners 文件和 Dependabot 的文档。https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/customizing-dependency-updates#setting-reviewers-and-assignees
我们不会在 Dependabot 操作中使用任何评论。
使用 @andreas-olsson 的评论,这就是我在 CODEOWNERS 文件中设置的内容。
这有点不完美,因为这意味着如果真实用户仅更改一个package.json文件而不更改其他文件,则代码所有者将不会收到该 PR 的通知。但目前还没有更好的解决方案。
# All files are by default owned by this team,
# unless a more specific ownership rule is set below.
* @my-dev-team-name
# Don't automatically assign reviewers on PRs that only modify these files.
# As they have no owner listed, these files are not owned by anyone.
package.json
package-lock.json
Run Code Online (Sandbox Code Playgroud)
如果您需要帮助修改它以适合您的文件结构,请查看CODEOWNERS 语法文档(上述解决方案假设包文件位于根目录中)。
| 归档时间: |
|
| 查看次数: |
541 次 |
| 最近记录: |