mirror of
https://github.com/octoleo/syncthing.git
synced 2024-09-19 05:09:01 +00:00
script: Don't verify authors on commits tagged 'Skip-check: authors'
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3057
This commit is contained in:
parent
39899e40bf
commit
10fe23b8f2
@ -76,6 +76,10 @@ func actualAuthorEmails(paths ...string) stringSet {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if strings.Contains(strings.ToLower(body(hash)), "skip-check: authors") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
authors.add(author)
|
authors.add(author)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,6 +103,15 @@ func listedAuthorEmails() stringSet {
|
|||||||
return authors
|
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
|
// A simple string set type
|
||||||
|
|
||||||
type stringSet map[string]struct{}
|
type stringSet map[string]struct{}
|
||||||
|
Loading…
Reference in New Issue
Block a user