camweb: enable default contributor name

Because I forgot to configure git one time on another machine, one of my
commits is with a lame username, and that username gets picked (instead
of the other ones) as my identity when generating the contributors page.

Therefore, this change allows to specify a default name among the already
hardcoded information for some of the contributors, so I can override
the badly configured identity that would appear otherwise.

Change-Id: I60dfe60f83d20aa33f7bf425e5b84a34bbd5a0b1
This commit is contained in:
mpl 2017-12-16 04:17:55 +01:00
parent c45893a69b
commit b66ede8500
1 changed files with 18 additions and 11 deletions

View File

@ -16,17 +16,21 @@ import (
) )
var urlsMap = map[string]author{ var urlsMap = map[string]author{
"brad@danga.com": {URL: "http://bradfitz.com/", Role: "founder, lead"}, "brad@danga.com": {URL: "http://bradfitz.com/", Role: "founder, lead"},
"bslatkin@gmail.com": {URL: "http://www.onebigfluke.com/", Role: "co-founder"}, "bslatkin@gmail.com": {URL: "http://www.onebigfluke.com/", Role: "co-founder"},
"mathieu.lonjaret@gmail.com": {URL: "https://granivo.re/", Role: "has touched almost everything"}, "mathieu.lonjaret@gmail.com": {
"zboogs@gmail.com": {URL: "http://www.aaronboodman.com/", Role: "web interface lead"}, URL: "https://granivo.re/mpl.html",
"adg@golang.org": {URL: "http://nf.id.au/"}, Role: "has touched almost everything",
"dustin@spy.net": {URL: "http://dustin.sallings.org/"}, Names: []string{"Mathieu Lonjaret"},
"dan@erat.org": {URL: "http://www.erat.org/"}, },
"martine@danga.com": {URL: "http://neugierig.org/"}, "zboogs@gmail.com": {URL: "http://www.aaronboodman.com/", Role: "web interface lead"},
"agl@golang.org": {URL: "http://www.imperialviolet.org/"}, "adg@golang.org": {URL: "http://nf.id.au/"},
"lsimon@commoner.com": {Role: "original publishing UI"}, "dustin@spy.net": {URL: "http://dustin.sallings.org/"},
"s@0x65.net": {URL: "https://0x65.net/"}, "dan@erat.org": {URL: "http://www.erat.org/"},
"martine@danga.com": {URL: "http://neugierig.org/"},
"agl@golang.org": {URL: "http://www.imperialviolet.org/"},
"lsimon@commoner.com": {Role: "original publishing UI"},
"s@0x65.net": {URL: "https://0x65.net/"},
} }
type author struct { type author struct {
@ -158,6 +162,9 @@ func genContribPage() ([]byte, error) {
if a != nil { if a != nil {
a.add(&m) a.add(&m)
} }
if len(m.Names) > 0 {
a.Names = []string{m.Names[0]}
}
} }
authors := Authors{} authors := Authors{}