prow/pluginhelp/hook/hook.go
func reversePluginMaps(config *plugins.Configuration, orgToRepos map[string]sets.String) (normal, external map[string][]string) {
	normal = map[string][]string{}
	for repo, enabledPlugins := range config.Plugins {
		var repos []string
		if !strings.Contains(repo, "/") {
			if flattened, ok := orgToRepos[repo]; ok {
				repos = flattened.List()
			}
		} else {
			repos = []string{repo}
		}
		for _, plugin := range enabledPlugins {
			normal[plugin] = append(normal[plugin], repos...)
		}
	}
	external = map[string][]string{}
	for repo, extPlugins := range config.ExternalPlugins {
		var repos []string
		if flattened, ok := orgToRepos[repo]; ok {
			repos = flattened.List()
		} else {
			repos = []string{repo}
		}
		for _, plugin := range extPlugins {
			external[plugin.Name] = append(external[plugin.Name], repos...)
		}
	}
	return
}
func reversePluginMaps(config *plugins.Configuration, orgToRepos map[string]sets.String) (normal, external map[string][]string) {
	normal = map[string][]string{}
	for repo, enabledPlugins := range config.Plugins {
		var repos []string
		if !strings.Contains(repo, "/") {
			if flattened, ok := orgToRepos[repo]; ok {
				repos = flattened.List()
			}
		} else {
			repos = []string{repo}
		}
		for _, plugin := range enabledPlugins {
			normal[plugin] = append(normal[plugin], repos...)
		}
	}
	external = map[string][]string{}
	for repo, extPlugins := range config.ExternalPlugins {
		var repos []string
		if flattened, ok := orgToRepos[repo]; ok {
			repos = flattened.List()
		} else {
			repos = []string{repo}
		}
		for _, plugin := range extPlugins {
			external[plugin.Name] = append(external[plugin.Name], repos...)
		}
	}
	return
}
func reversePluginMaps ( config * plugins . Configuration , orgToRepos map [ string ] sets . String ) ( normal , external map [ string ] [ ] string ) { normal = map [ string ] [ ] string { } for repo , enabledPlugins := range config . Plugins { var repos [ ] string if ! strings . Contains ( repo , " " ) { if flattened , ok := orgToRepos [ repo ] ; ok { repos = flattened . List ( ) } } else { repos = [ ] string { repo } } for _ , plugin := range enabledPlugins { normal [ plugin ] = append ( normal [ plugin ] , repos ... ) } } external = map [ string ] [ ] string { } for repo , extPlugins := range config . ExternalPlugins { var repos [ ] string if flattened , ok := orgToRepos [ repo ] ; ok { repos = flattened . List ( ) } else { repos = [ ] string { repo } } for _ , plugin := range extPlugins { external [ plugin . Name ] = append ( external [ plugin . Name ] , repos ... ) } } return }
// reversePluginMaps inverts the Configuration.Plugins and Configuration.ExternalPlugins maps and
// expands any org strings to org/repo strings.
// The returned values map plugin names to the set of org/repo strings they are enabled on.
reversePluginMaps inverts the Configuration . Plugins and Configuration . ExternalPlugins maps and expands any org strings to org / repo strings . The returned values map plugin names to the set of org / repo strings they are enabled on .