fix: Add the missing include/exclude repo filters to team settings schema#1009
fix: Add the missing include/exclude repo filters to team settings schema#1009neatcoder wants to merge 1 commit into
Conversation
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.
There was a problem hiding this comment.
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
TeamSettingsin org/repo/suborg JSON schemas to includeincludeandexcluderepo filters (mirroring theCollaboratorSettingsallOfpattern). - Document
include/excludein 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.
|
Addressing copilot comments: |
|
Also, tried to @github/ps-delivery team for a review but seems like it's disabled for me. This doc may need some updating |
Team entries are filtered by the same Diffable include/exclude logic that collaborators use, but unlike collaborators those keys were never part of the
TeamSettingsschema or documented, so editors and linters can't validate them.Mirror the
allOfpattern ofCollaboratorSettingsto 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
Solves #1011