Skip to content

fix: Add the missing include/exclude repo filters to team settings schema#1009

Open
neatcoder wants to merge 1 commit into
github:main-enterprisefrom
neatcoder:neatcoder/team-include-exclude
Open

fix: Add the missing include/exclude repo filters to team settings schema#1009
neatcoder wants to merge 1 commit into
github:main-enterprisefrom
neatcoder:neatcoder/team-include-exclude

Conversation

@neatcoder

Copy link
Copy Markdown

Team entries are filtered by the same Diffable include/exclude logic that collaborators use, but unlike collaborators those keys were never part of the TeamSettings schema or documented, so editors and linters can't validate them.

Mirror the allOf pattern of CollaboratorSettings to declare include and exclude on TeamSettings, document both in the teams guide with examples, add a sample, and cover the filter path with unit tests.

No runtime changes in the logic

Team entries are filtered by the same Diffable include/exclude logic that
collaborators use, but unlike collaborators those keys were never part of the
TeamSettings schema or documented, so editors and linters can't validate them.

Mirror the CollaboratorSettings allOf pattern to declare include and exclude on
TeamSettings, document both in the teams guide with examples, add a sample, and
cover the filter path with unit tests. No runtime changes.
Copilot AI review requested due to automatic review settings June 24, 2026 18:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the safe-settings configuration schema and documentation so teams entries can be filtered per-repo using the existing Diffable include/exclude glob logic (previously supported at runtime but not declared in the TeamSettings schema).

Changes:

  • Extend TeamSettings in org/repo/suborg JSON schemas to include include and exclude repo filters (mirroring the CollaboratorSettings allOf pattern).
  • Document include/exclude in the teams guide and add representative examples in the sample settings YAML.
  • Add unit tests covering the include/exclude filtering path for the Teams plugin and regenerate dereferenced schema artifacts.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
test/unit/lib/plugins/teams.test.js Adds unit tests validating include/exclude filtering behavior for team sync.
schema/settings.json Adds include/exclude to TeamSettings via allOf for org-level schema validation.
schema/repos.json Adds include/exclude to TeamSettings via allOf for repo-level override schema validation.
schema/suborgs.json Adds include/exclude to TeamSettings via allOf for suborg-level schema validation.
schema/dereferenced/settings.json Updates dereferenced org-level schema output to reflect the new TeamSettings structure.
schema/dereferenced/repos.json Updates dereferenced repo-level schema output to reflect the new TeamSettings structure.
schema/dereferenced/suborgs.json Updates dereferenced suborg-level schema output to reflect the new TeamSettings structure.
docs/github-settings/4. teams.md Documents include/exclude for teams with examples in the teams guide.
docs/sample-settings/settings.yml Adds sample team entries demonstrating include and exclude.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +164 to +168
- name: docs-team
permission: pull
# You can include a list of repos for this team and only those repos would have this team
include:
- actions-demo
Comment on lines +169 to +173
- name: ops-team
permission: push
# You can exclude a list of repos for this team and all repos except these repos would have this team
exclude:
- actions-demo
Comment thread schema/settings.json
Comment on lines +207 to +209
"exclude": {
"description": "You can exclude a list of repos for this team and all repos except these repos would have this team",
"type": "array",
Comment thread schema/settings.json
Comment on lines +214 to +216
"include": {
"description": "You can include a list of repos for this team and only those repos would have this team",
"type": "array",
Comment thread schema/repos.json
Comment on lines +200 to +202
"exclude": {
"description": "You can exclude a list of repos for this team and all repos except these repos would have this team",
"type": "array",
Comment thread schema/repos.json
Comment on lines +207 to +209
"include": {
"description": "You can include a list of repos for this team and only those repos would have this team",
"type": "array",
Comment thread schema/suborgs.json
Comment on lines +234 to +236
"exclude": {
"description": "You can exclude a list of repos for this team and all repos except these repos would have this team",
"type": "array",
Comment thread schema/suborgs.json
Comment on lines +241 to +243
"include": {
"description": "You can include a list of repos for this team and only those repos would have this team",
"type": "array",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants