Skip to content

Commit

Permalink
Merge pull request docker#60 from vdemeester/update-maintainers
Browse files Browse the repository at this point in the history
Update project maintainers
  • Loading branch information
thaJeztah committed Mar 18, 2016
2 parents 2342879 + 755fad6 commit 9dd45b4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 9 deletions.
18 changes: 11 additions & 7 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ or feedback about project operations.

[Org]
[Org.Curators]
People = ["amitshukla", "thajeztah"]
People = ["programmerq", "thajeztah", "amitshukla"]
[Org."Docs maintainers"]
People = ["jamtur01", "moxiegirl", "sven", "thajeztah"]
[Org.boot2docker]
Expand All @@ -312,15 +312,15 @@ or feedback about project operations.
[Org.distribution]
People = ["aaronlehmann", "dmcgowan", "dmp42", "richardscothern", "shykes", "stevvooe"]
[Org.docker]
People = ["calavera", "coolljt0725", "cpuguy83", "crosbymichael", "duglin", "estesp", "icecrime", "jfrazelle", "lk4d4", "mhbauer", "runcom", "tianon", "tibor", "tonistiigi", "unclejack", "vbatts", "vdemeester"]
People = ["aaronlehmann", "calavera", "coolljt0725", "cpuguy83", "crosbymichael", "duglin", "estesp", "icecrime", "jhowardmsft", "jfrazelle", "lk4d4", "mhbauer", "runcom", "tianon", "tibor", "tonistiigi", "unclejack", "vbatts", "vdemeester"]
[Org.docker-bench-security]
People = ["diogomonica", "konstruktoid"]
[Org.docker-py]
People = ["aanand", "dnephin", "mnowster", "mpetazzoni", "shin-"]
[Org.dockercraft]
People = ["aduermael", "davetucker", "gdevillele"]
[Org.engine-api]
People = ["calavera", "dongluochen", "mhbauer"]
People = ["calavera", "dongluochen", "mhbauer", "vdemeester"]
[Org.go-connections]
People = ["calavera"]
[Org.go-plugins-helpers]
Expand Down Expand Up @@ -509,6 +509,10 @@ or feedback about project operations.
Name = "Jessie Frazelle"
Email = "acidburn@docker.com"
GitHub = "jfrazelle"
[People.jhowardmsft]
Name = "John Howard"
Email = "jhoward@microsoft.com"
GitHub = "jhowardmsft"
[People.jimmyxian]
Name = "Xian Chaobo"
Email = "xianchaobo@huawei.com"
Expand Down Expand Up @@ -569,6 +573,10 @@ or feedback about project operations.
Name = "Nishant Totla"
Email = "nishanttotla@gmail.com"
GitHub = "nishanttotla"
[People.programmerq]
Name = "Jeff Anderson"
Email = "jeff@docker.com"
GitHub = "programmerq"
[People.richardscothern]
Name = "Richard Scothern"
Email = "richard.scothern@gmail.com"
Expand Down Expand Up @@ -605,10 +613,6 @@ or feedback about project operations.
Name = "Sebastiaan van Stijn"
Email = "github@gone.nl"
GitHub = "thaJeztah"
[People.theadactyl]
Name = "Thea Lamkin"
Email = "thea@docker.com"
GitHub = "theadactyl"
[People.tianon]
Name = "Tianon Gravi"
Email = "admwiggin@gmail.com"
Expand Down
23 changes: 21 additions & 2 deletions maintainercollector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ func main() {
People: map[string]Person{},
}

// initialize Curators
projectMaintainers.Org["Curators"] = &Org{}
projectMaintainers.Org["Docs maintainers"] = &Org{}

// parse the MAINTAINERS file for each repo
for _, project := range projects {
maintainers, err := getMaintainers(project)
Expand All @@ -94,11 +98,11 @@ func main() {
projectMaintainers.Org[project] = p

if maintainers.Organization.DocsMaintainers != nil {
projectMaintainers.Org["Docs maintainers"] = maintainers.Organization.DocsMaintainers
projectMaintainers.Org["Docs maintainers"].People = append(projectMaintainers.Org["Docs maintainers"].People, maintainers.Organization.DocsMaintainers.People...)
}

if maintainers.Organization.Curators != nil {
projectMaintainers.Org["Curators"] = maintainers.Organization.Curators
projectMaintainers.Org["Curators"].People = append(projectMaintainers.Org["Curators"].People, maintainers.Organization.Curators.People...)
}

// iterate through the people and add them to compiled list
Expand All @@ -107,6 +111,9 @@ func main() {
}
}

projectMaintainers.Org["Curators"].People = removeDuplicates(projectMaintainers.Org["Curators"].People)
projectMaintainers.Org["Docs maintainers"].People = removeDuplicates(projectMaintainers.Org["Docs maintainers"].People)

// encode the result to a file
buf := new(bytes.Buffer)
t := toml.NewEncoder(buf)
Expand All @@ -126,6 +133,18 @@ func main() {
logrus.Infof("Successfully wrote new combined MAINTAINERS file.")
}

func removeDuplicates(slice []string) []string {
seens := map[string]bool{}
uniqs := []string{}
for _, element := range slice {
if _, seen := seens[element]; !seen {
uniqs = append(uniqs, element)
seens[element] = true
}
}
return uniqs
}

func getMaintainers(project string) (maintainers MaintainersDepreciated, err error) {
fileUrl := fmt.Sprintf("%s/%s/%s/master/MAINTAINERS", ghRawUri, org, project)
resp, err := http.Get(fileUrl)
Expand Down

0 comments on commit 9dd45b4

Please sign in to comment.