five-for-the-future
five-for-the-future copied to clipboard
Automatically assign closed groups
Continuation of #83
PRT & Security were removed from the list of available teams, because they're closed groups. We can still display the team for people who are members of the group, though.
We can determine who's on the team by looking at the corresponding Profile badges.
There are two possible approaches:
- add the data to the database when a profile is updated, overriding the
POST
ed list of teams. - add it on the fly when the data is grabbed from the database.
The former is probably best, because the data would have a single/canonical source of truth, rather than having WET code that in various places duplicating logic (or missing it entirely). The logic couldn't be shared in a practical way, b/c some things live in closed repos and others in open, and more importantly some things need to query the db directly for performance.
We might be able to use private slack channels for this with code like
https://github.com/WordPress/wordpress.org/blob/b8ec42a9d7c77f6d69789a12f5f211c54d459f81/api.wordpress.org/public_html/dotorg/slack/security-team.php#L28-L34