Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing TSC and GB to be approvers everywhere #16

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const (
Admins string = "admins"
Maintainers string = "maintainers"
Approvers string = "approvers"
TSC string = "technical-steering-committee"
GB string = "governance-board"
)

type options struct {
Expand Down Expand Up @@ -134,11 +136,15 @@ func loadOrgs(o options) (map[string]org.Config, error) {
admins := getGlobalTeam(cfg, Admins)
maintainers := getGlobalTeam(cfg, Maintainers)
approvers := getGlobalTeam(cfg, Approvers)
tsc := getGlobalTeam(cfg, TSC)
gb := getGlobalTeam(cfg, GB)

for name := range cfg.Repos {
admins.Repos[name] = github.Admin
maintainers.Repos[name] = github.Maintain
approvers.Repos[name] = github.Write
tsc.Repos[name] = github.Write
gb.Repos[name] = github.Write
cfg.Repos[name] = applyRepoDefaults(cfg, name)

cfg.Repos[name] = enhanceUrl(cfg, name, o)
Expand All @@ -147,6 +153,8 @@ func loadOrgs(o options) (map[string]org.Config, error) {
cfg.Teams[Admins] = admins
cfg.Teams[Maintainers] = maintainers
cfg.Teams[Approvers] = approvers
cfg.Teams[TSC] = tsc
cfg.Teams[GB] = gb
config[name] = *cfg
}
}
Expand Down