File tree Expand file tree Collapse file tree 5 files changed +24
-0
lines changed Expand file tree Collapse file tree 5 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ import { defineGroups } from './utils';
55//
66// Email groups (isEmailGroup: true) accept emails from anyone (including external users)
77// and notify group members for each email.
8+ //
9+ // Groups are created on all platforms (GitHub and Google) by default.
10+ // To limit a group to specific platforms, set the onlyOnPlatforms array (e.g., onlyOnPlatforms: ['google']).
811export const GROUPS = defineGroups ( [
912 {
1013 name : 'test-parent' ,
@@ -24,5 +27,12 @@ export const GROUPS = defineGroups([
2427 name : 'antitrust' ,
2528 description : 'Antitrust compliance contacts' ,
2629 isEmailGroup : true ,
30+ onlyOnPlatforms : [ 'google' ] ,
31+ } ,
32+ {
33+ name : 'catch-all' ,
34+ description : 'Catch-all email group' ,
35+ isEmailGroup : true ,
36+ onlyOnPlatforms : [ 'google' ] ,
2737 } ,
2838] as const ) ;
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ export const MEMBERS: readonly Member[] = [
66 email : 'adam@modelcontextprotocol.io' ,
77 memberOf : [ 'test-child' ] ,
88 } ,
9+ {
10+ email : 'adamj@anthropic.com' ,
11+ memberOf : [ 'catch-all' ] ,
12+ } ,
913 {
1014 email : 'davidsp@anthropic.com' ,
1115 memberOf : [ 'antitrust' ] ,
Original file line number Diff line number Diff line change @@ -4,12 +4,15 @@ function isValidGroupName(name: string): boolean {
44 return / ^ [ a - z ] [ a - z 0 - 9 - ] * [ a - z ] $ / . test ( name ) ;
55}
66
7+ export type Platform = 'github' | 'google' ;
8+
79export function defineGroups <
810 const T extends readonly {
911 name : Lowercase < string > ;
1012 description : string ;
1113 memberOf ?: readonly ( T [ number ] [ 'name' ] ) [ ] ;
1214 isEmailGroup ?: boolean ;
15+ onlyOnPlatforms ?: readonly Platform [ ] ;
1316 } [ ]
1417> ( groups : T ) {
1518 for ( const group of groups ) {
@@ -30,6 +33,7 @@ export interface Group {
3033 description : string ;
3134 memberOf ?: readonly GroupKey [ ] ;
3235 isEmailGroup ?: boolean ;
36+ onlyOnPlatforms ?: readonly Platform [ ] ;
3337}
3438
3539export interface Member {
Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ import { MEMBERS } from './config/users';
66const teams : Record < string , github . Team > = { } ;
77
88GROUPS . forEach ( ( group : Group ) => {
9+ // Skip groups that don't include github in their platforms
10+ if ( group . onlyOnPlatforms && ! group . onlyOnPlatforms . includes ( 'github' ) ) return ;
11+
912 teams [ group . name ] = new github . Team ( group . name , {
1013 name : group . name ,
1114 description : group . description + ' \n(Managed by github.com/modelcontextprotocol/access)' ,
Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ import { MEMBERS } from './config/users';
66const groups : Record < string , gworkspace . Group > = { } ;
77
88GROUPS . forEach ( ( group : Group ) => {
9+ // Skip groups that don't include google in their platforms
10+ if ( group . onlyOnPlatforms && ! group . onlyOnPlatforms . includes ( 'google' ) ) return ;
11+
912 groups [ group . name ] = new gworkspace . Group ( group . name , {
1013 email : `${ group . name } @modelcontextprotocol.io` ,
1114 name : group . name ,
You can’t perform that action at this time.
0 commit comments