fix: Add the missing include/exclude repo filters to team settings schema#1009
Open
neatcoder wants to merge 1 commit into
Open
fix: Add the missing include/exclude repo filters to team settings schema#1009neatcoder wants to merge 1 commit into
neatcoder 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.
Contributor
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.
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 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 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 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 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 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 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", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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