Bläddra i källkod

gui, authors: Remove additional bot names (#8333)

Skip Syncthing*Automation in authors list as well.
André Colomb 3 år sedan
förälder
incheckning
235422c26d
2 ändrade filer med 9 tillägg och 3 borttagningar
  1. 0 0
      gui/default/syncthing/core/aboutModalView.html
  2. 9 3
      script/authors.go

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
gui/default/syncthing/core/aboutModalView.html


+ 9 - 3
script/authors.go

@@ -28,10 +28,16 @@ import (
 const htmlFile = "gui/default/syncthing/core/aboutModalView.html"
 const htmlFile = "gui/default/syncthing/core/aboutModalView.html"
 
 
 var (
 var (
-	nicknameRe = regexp.MustCompile(`\(([^\s]*)\)`)
-	emailRe    = regexp.MustCompile(`<([^\s]*)>`)
+	nicknameRe        = regexp.MustCompile(`\(([^\s]*)\)`)
+	emailRe           = regexp.MustCompile(`<([^\s]*)>`)
+	authorBotsRegexps = []string{
+		`\[bot\]`,
+		`Syncthing.*Automation`,
+	}
 )
 )
 
 
+var authorBotsRe = regexp.MustCompile(strings.Join(authorBotsRegexps, "|"))
+
 const authorsHeader = `# This is the official list of Syncthing authors for copyright purposes.
 const authorsHeader = `# This is the official list of Syncthing authors for copyright purposes.
 #
 #
 # THIS FILE IS MOSTLY AUTO GENERATED. IF YOU'VE MADE A COMMIT TO THE
 # THIS FILE IS MOSTLY AUTO GENERATED. IF YOU'VE MADE A COMMIT TO THE
@@ -100,7 +106,7 @@ func main() {
 
 
 	var lines []string
 	var lines []string
 	for _, author := range authors {
 	for _, author := range authors {
-		if strings.Contains(author.name, "[bot]") {
+		if authorBotsRe.MatchString(author.name) {
 			// Only humans are eligible, pending future legislation to the
 			// Only humans are eligible, pending future legislation to the
 			// contrary.
 			// contrary.
 			continue
 			continue

Vissa filer visades inte eftersom för många filer har ändrats