summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Borg <jakob@nym.se>2016-05-08 10:47:57 +0000
committerJakob Borg <jakob@nym.se>2016-05-08 10:47:57 +0000
commit10fe23b8f2fd7ad9fbd9e461c0220f3ac054050f (patch)
treecb84ea8f1c187116d7294c5ac6de0da8a7f93d09
parent39899e40bf1e0186319a614a13d2c8153e5d336d (diff)
script: Don't verify authors on commits tagged 'Skip-check: authors'
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3057
-rw-r--r--script/check-authors.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/script/check-authors.go b/script/check-authors.go
index c9060513d0..95d875f0f8 100644
--- a/script/check-authors.go
+++ b/script/check-authors.go
@@ -76,6 +76,10 @@ func actualAuthorEmails(paths ...string) stringSet {
continue
}
+ if strings.Contains(strings.ToLower(body(hash)), "skip-check: authors") {
+ continue
+ }
+
authors.add(author)
}
@@ -99,6 +103,15 @@ func listedAuthorEmails() stringSet {
return authors
}
+func body(hash string) string {
+ cmd := exec.Command("git", "show", "--pretty=format:%b", "-s", hash)
+ bs, err := cmd.Output()
+ if err != nil {
+ log.Fatal("body:", err)
+ }
+ return string(bs)
+}
+
// A simple string set type
type stringSet map[string]struct{}