Closed melkosoft closed 3 years ago
Sorry I was wrong about groups, still better to do filtering by organization and as result have just teams from organization without github/org/team_name. In this case when using $groups in packages section user will use scope like "@team_name/package":
packages:
"@*/*":
access: $authenticated
publish: $group
There are several things in your latest release which are wrong: REST API you are using for teams request will return all teams VISIBLE for user. For enterprise github my account as owner of organization may see ALL teams not only teams I am member of. There only way to get teams for user other than going through each team and get list of members - graphQL query. I modified query Bertrand used because without pagination graphQL will return only 100 first results. I am using slug instead of name for team because team name may include spaces which is not very good... I also modified team filter to accept multiple teams as filter and I added teams requested to real_group array for authorization