From b66ede8500574cb18eaf5f9ccfb16deaa98d3c85 Mon Sep 17 00:00:00 2001 From: mpl Date: Sat, 16 Dec 2017 04:17:55 +0100 Subject: [PATCH] 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 --- website/contributors.go | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/website/contributors.go b/website/contributors.go index e34a3d9f7..a2b431776 100644 --- a/website/contributors.go +++ b/website/contributors.go @@ -16,17 +16,21 @@ import ( ) var urlsMap = map[string]author{ - "brad@danga.com": {URL: "http://bradfitz.com/", Role: "founder, lead"}, - "bslatkin@gmail.com": {URL: "http://www.onebigfluke.com/", Role: "co-founder"}, - "mathieu.lonjaret@gmail.com": {URL: "https://granivo.re/", Role: "has touched almost everything"}, - "zboogs@gmail.com": {URL: "http://www.aaronboodman.com/", Role: "web interface lead"}, - "adg@golang.org": {URL: "http://nf.id.au/"}, - "dustin@spy.net": {URL: "http://dustin.sallings.org/"}, - "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/"}, + "brad@danga.com": {URL: "http://bradfitz.com/", Role: "founder, lead"}, + "bslatkin@gmail.com": {URL: "http://www.onebigfluke.com/", Role: "co-founder"}, + "mathieu.lonjaret@gmail.com": { + URL: "https://granivo.re/mpl.html", + Role: "has touched almost everything", + Names: []string{"Mathieu Lonjaret"}, + }, + "zboogs@gmail.com": {URL: "http://www.aaronboodman.com/", Role: "web interface lead"}, + "adg@golang.org": {URL: "http://nf.id.au/"}, + "dustin@spy.net": {URL: "http://dustin.sallings.org/"}, + "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 { @@ -158,6 +162,9 @@ func genContribPage() ([]byte, error) { if a != nil { a.add(&m) } + if len(m.Names) > 0 { + a.Names = []string{m.Names[0]} + } } authors := Authors{}