TeamSettings schema missing include/exclude repo filter declarations

未关闭
#1,011 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
70/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
冷清
技术栈
javascript

调研方向

首先比较 schema/repos.json、schema/settings.json、schema/suborgs.json 中的 CollaboratorSettings 定义及其解除引用后的对应定义,然后阅读 docs/github-settings/4. teams.md、docs/sample-settings/settings.yml 和现有的 Collaborators 测试。完成标准是:schemas 接受 team include/exclude 过滤器,Teams 指南和示例展示这两种形式,并且 Teams 测试覆盖过滤器路径。

由索引模型根据 Issue 内容生成。

描述

enhancement

Prerequisites:

  • Is the functionality available in the GitHub UI? If so, please provide a link to information about the feature.

    N/A — this request is for schema validation and documentation of an existing safe-settings feature, not a new GitHub API capability.

  • Is the functionality available through the GitHub API? If the functionality is available, please provide links to the API documentation (https://developer.github.com/v3/) as well as the Octokit documentation (https://octokit.github.io/).

    N/A — include/exclude repo filtering is internal safe-settings logic (the Diffable class), not a GitHub API concept. The filtering already works at runtime for teams entries; it is simply not declared in the schema or covered in the documentation.

New Feature

The teams section of a safe-settings configuration already supports include and exclude repo filters at runtime via the same Diffable logic used by collaborators. However, unlike collaborators, these keys are not declared in the TeamSettings JSON schema and are not documented in the teams guide.

This means:

  • Editors and linters that validate configuration files against the schema report include/exclude as unknown properties on team entries, even though they are valid and functional.
  • There is no official documentation or example showing users how to use per-repo filtering for teams.

Please describe the desired new functionality:

  1. The TeamSettings definition in schema/repos.json, schema/settings.json, and schema/suborgs.json (and their dereferenced counterparts) should declare include and exclude using the same allOf pattern already used by CollaboratorSettings, so that editors and schema validators accept these fields without warnings.

  2. The teams guide should document include and exclude with descriptions and YAML examples consistent with the collaborators guide.

  3. The sample settings file should include representative team entries demonstrating both include and exclude.

  4. Unit tests should cover the include/exclude filter code path for the Teams plugin, mirroring the coverage that exists for Collaborators.

No changes to runtime logic are required.

主要语言
JavaScript
星标
942
派生
238
PR 合并指标
30 天内没有已合并 PR

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github-community-projects/safe-settings 的其他 Issue

查看 github-community-projects/safe-settings 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。