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

@neatcoder neatcoder commented Jun 24, 2026

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

Solves #1011

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 thread docs/sample-settings/settings.yml
Comment thread docs/sample-settings/settings.yml
Comment thread schema/settings.json
Comment thread schema/settings.json
Comment thread schema/repos.json
Comment thread schema/repos.json
Comment thread schema/suborgs.json
Comment thread schema/suborgs.json
@neatcoder

Copy link
Copy Markdown
Author

Addressing copilot comments:
For consistency, the description wordings in schemas were copied from existing CollaboratorSettings definitions. I agree it reads a little awkwardly and doesn't spell out that these are glob patterns matched against the repo name but fixing it requires updating the collaborator (and likely label) descriptions too, which feels out of scope for this change. However, happy to open a separate issue to track a description cleanup across all the settings types (teams/collaborators/labels) if you would want that.

@neatcoder

neatcoder commented Jun 25, 2026

Copy link
Copy Markdown
Author

Also, tried to @github/ps-delivery team for a review but seems like it's disabled for me. This doc may need some updating

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